Cafu Engine
MorphPrimT Class Reference

This is a helper class for the ToolMorphT ("edit vertices") tool. More...

#include "MorphPrim.hpp"

Public Member Functions

 MorphPrimT (const MapPrimitiveT *MapPrim)
 The constructor. More...
 
const MapPrimitiveTGetMapPrim () const
 
bool IsModified () const
 
MapPrimitiveTGetMorphedMapPrim () const
 Returns a newly created instance matching the morphed map primitive, or NULL if reconstruction was not possible. More...
 
void MoveSelectedHandles (const Vector3fT &Delta)
 Moves the selected handles by Delta. More...
 
void Render (Renderer2DT &Renderer, bool RenderVertexHandles, bool RenderEdgeHandles) const
 
void Render (Renderer3DT &Renderer, bool RenderVertexHandles, bool RenderEdgeHandles) const
 

Public Attributes

ArrayT< MP_VertexT * > m_Vertices
 
ArrayT< MP_EdgeT * > m_Edges
 
ArrayT< MP_FaceT * > m_Faces
 

Detailed Description

This is a helper class for the ToolMorphT ("edit vertices") tool.

It represents a map primitive (a brush or a bezier patch) that is currently being morphed by the tool.

This class is considered a helper class, because the user code (i.e. the morph tool) (currently) needs knowledge about the implementation of this class whenever it keeps pointers to parts (vertices, edges) of the object that this class represents. Such pointers into the internal structures may become invalidated by certain methods, and thus great care is required.

Constructor & Destructor Documentation

MorphPrimT::MorphPrimT ( const MapPrimitiveT MapPrim)

The constructor.

Parameters
MapPrimThe original brush or bezier patch that this MorphPrimT is associated with / attached to. Note that this MorphPrimT does not become the "owner" of the MapPrim pointer, e.g. it does not attempt to delete it in its dtor. That also means that this MorphPrimT should not live longer than the MapPrim object.

Member Function Documentation

MapPrimitiveT * MorphPrimT::GetMorphedMapPrim ( ) const

Returns a newly created instance matching the morphed map primitive, or NULL if reconstruction was not possible.

It does not reset the modified-flag.

void MorphPrimT::MoveSelectedHandles ( const Vector3fT Delta)

Moves the selected handles by Delta.


The documentation for this class was generated from the following files: