Exemplo n.º 1
0
CShape3D *CPlane::GetTransformed(CXForm const &kXForm, CShape3D *pDstShape) const
{
  CPlane *pPlane;
  if (pDstShape) {
    pPlane = Cast<CPlane>(pDstShape);
    ASSERT(pPlane && pPlane->IsHalfSpace() == IsHalfSpace());
    if (!pPlane || pPlane->IsHalfSpace() != IsHalfSpace())
      return 0;
  } else
    pPlane = (CPlane *) GetRTTI()->CreateInstance();
  Transform(m_vPlane, kXForm, pPlane->m_vPlane);
  return pPlane;
}
Exemplo n.º 2
0
CShape3D *CLine3D::GetTransformed(CXForm const &kXForm, CShape3D *pDstShape) const
{
  CLine3D *pLine;
  if(pDstShape) {
    pLine = Cast<CLine3D>(pDstShape);
    ASSERT(pLine && pLine->GetMinLimit() == GetMinLimit() && pLine->GetMaxLimit() == GetMaxLimit());
    if (!pLine || pLine->GetMinLimit() != GetMinLimit() || pLine->GetMaxLimit() != GetMaxLimit())
      return 0;
  } else
    pLine = (CLine3D *) GetRTTI()->CreateInstance();
  Transform(m_vPoints[0], m_vPoints[1], kXForm, pLine->m_vPoints[0], pLine->m_vPoints[1]);
  return pLine;
}
Exemplo n.º 3
0
const char* Exception::what() {
	const RTTI* rtti = GetRTTI();

	m_body->m_what = "Error;";
    m_body->m_what += m_body->m_file;
    m_body->m_what += ';';
    m_body->m_what += (euint)m_body->m_line;
    m_body->m_what += ';';
	m_body->m_what += rtti->GetTypeName();
    m_body->m_what += ';';
	m_body->m_what += m_body->m_msg;

	return m_body->m_what.c_str();
}
Exemplo n.º 4
0
CShape3D *CShape3D::Clone() const
{
  CShape3D *pShape = (CShape3D *) GetRTTI()->CreateInstance();
  pShape->CopyFrom(this);
  return pShape;
}