Polygon Crucher SDK - Documentation
Documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
C3DObjectCreator Class Reference

This class can be provided in C3DScene::Copy operations and allows to modify the created kind of class during the copy operation. More...

Detailed Description

This class can be provided in C3DScene::Copy operations and allows to modify the created kind of class during the copy operation.

If you intend to overidde some specific class, such C3DPointList, you can create a copy of the scene that will use this new class. C3DPolygonCruncherObjectCreator typically does this, using C3DExtPointList for object instead of the standard C3DPointList.

#include <3DScene.h>

Inheritance diagram for C3DObjectCreator:
C3DPolygonCruncherObjectCreator

Public Member Functions

 C3DObjectCreator (C3DScene *scene=NULL)
 Destination scene to which the element is copied.
 
virtual C3DBaseObjectConvertToType (const C3DSceneNode *refnode, const C3DBaseObject *refobject)
 Convert refobject to another type. return the object itself if no conversion performed.
 
virtual C3DBaseObjectGetNewObjectFrom (const C3DBaseObject *refobject, bool &emptyCopy)
 Return an object from the provided refobject. Returned object might be empty (empty points/faces/channels). In this case, object copy fills the returned empty object.
 
virtual bool CanProcess (const C3DSceneNode *node, const C3DBaseObject *object)
 Return true if the node and its object should be copied / converted.
 
C3DSceneGetScene () const
 Set the scene to which the copied object will belong to. The element GUID is updated.
 
void SetScene (C3DScene *scene)
 Set the scene to which the copied object will belong to. The element GUID is updated.
 
CCustomDataGetCustomData ()
 Can be used to store some information.
 
overriden possibilities

The following methods are called to create the copy of the object It gives a chance to the copy method to copy the object to a different type

virtual C3DFaceListGetNewFaceList ()
 
virtual C3DPointListGetNewPointList ()
 
virtual C3DObjectGetNewPolygonalObject ()
 
virtual C3DCurveGetNewCurveObject ()
 
virtual C3DPatchGetNewPatchObject ()
 
virtual C3DGroupGetNewGroupObject ()
 
virtual C3DDummyGetNewDummy ()
 
virtual C3DCameraGetNewCamera ()
 
virtual C3DLightGetNewLight ()
 

Constructor & Destructor Documentation

◆ C3DObjectCreator()

C3DObjectCreator::C3DObjectCreator ( C3DScene scene = NULL)

Destination scene to which the element is copied.

The element GUID will remain the same if the destination scene differs from the original scene, or if no scene (= NULL) is defined. If no scene is defined, the element is not attached to any scene until it is attached to the scene (using C3DScene::AddNode for example)

Member Function Documentation

◆ GetNewPolygonalObject()

virtual C3DObject * C3DObjectCreator::GetNewPolygonalObject ( )
virtual

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