Geometry Class Reference

This reference page is linked to from the following overview topics: Mudbox Scenes, Scene Graph, Transformations and Coordinate Space Conversions, Subdivision.



Detailed Description

Represents a 3d object in the scene.

Definition at line 35 of file geometry.h.

#include <geometry.h>

Inheritance diagram for Geometry:
Inheritance graph
[legend]

List of all members.

Public Types

enum   MatchMode { matchByVertexID, matchByUV, matchByVertexPosition }

Public Member Functions

virtual unsigned int  LevelCount (void) const
  Returns the number of the subdivision levels in the object.
virtual SubdivisionLevel LowestLevel (void) const
  Returns a pointer to the lowest subdivision level (the one with the fewest faces).
virtual SubdivisionLevel HighestLevel (void) const
  Returns a pointer to the highest subdivision level (the one with the most faces).
virtual SubdivisionLevel Level (unsigned int iIndex) const
  Returns a subdivision level by index. Returns NULL if index is out-of-range.
virtual void  AddLevel (SubdivisionLevel *pLevel, bool bFirst=false)
  Adds a subdivision level to the object.
virtual bool  RemoveHighestLevel ()
  Removes the highest subdivision level from this geometry and deletes it.
virtual SubdivisionLevel ActiveLevel (void) const
  Returns the active subdivision level. The active subdivision level is the level that.
virtual bool  ChangeActiveLevel (const SubdivisionLevel *pNewLevel)
  Changes the active subdivision level. For example, to step up levels, you can do this:
virtual unsigned int  LayerCount () const
  Returns the number of sculpt layers in this geometry.
virtual LayerMeshData LayerData (const QString &sLayerName) const
  Convenience method to return a pointer to the layer delta/mask data for the specified layer.
virtual LayerMeshData LayerData (unsigned int iLayer, const SubdivisionLevel *pLevel) const
  Returns a pointer to the layer delta/mask data for the specified layer.
virtual mudbox::Material Material (void) const
  Returns the material associated with this geometry.
virtual void  SetMaterial (mudbox::Material *pMaterial)
  Sets the material associated with this geometry.
virtual mudbox::Material MaterialOverride (void) const
  Returns the material override associated with this geometry.
virtual void  SetMaterialOverride (mudbox::Material *pMaterialOverride)
  Sets the override material. If set to NULL then normal material.
virtual void  SetActiveLevel (SubdivisionLevel *pNewActiveLevel)
  Obsolete. Do not use this method. Use ChangeActiveLevel instead.
virtual int  GeometryID (void) const
  Returns the geometry ID. Geometry ID is used to make the operations that contain deleting and undo deleting geometry correct.
virtual void  ImportUVs (const Geometry *pSource, MatchMode eMode=matchByVertexID, float fTolerance=0.001f)
  Imports a UV set from pSource to this Geometry. Note this method fails if the active level of this geometry.

Public Attributes

aptr< SubdivisionLevel m_pActiveLevel
  This variable contains the address of the active level.

Protected Member Functions

  Geometry (void)
  Constructor. Do not use this directly; use CreateInstance() instead.

Member Enumeration Documentation

enum MatchMode
Enumerator:
matchByVertexID 

Match vertices by their vertex IDs.

matchByUV 

Match vertices by using their UV coordinates.

matchByVertexPosition 

Match vertices by their position in world space.

Definition at line 55 of file geometry.h.


Constructor & Destructor Documentation

Geometry ( void  ) [protected]

Constructor. Do not use this directly; use CreateInstance() instead.


Member Function Documentation

virtual unsigned int LevelCount ( void  ) const [virtual]

Returns the number of the subdivision levels in the object.

virtual SubdivisionLevel* LowestLevel ( void  ) const [virtual]

Returns a pointer to the lowest subdivision level (the one with the fewest faces).

virtual SubdivisionLevel* HighestLevel ( void  ) const [virtual]

Returns a pointer to the highest subdivision level (the one with the most faces).

virtual SubdivisionLevel* Level ( unsigned int  iIndex ) const [virtual]

Returns a subdivision level by index. Returns NULL if index is out-of-range.

Parameters:
[in] iIndex Index of the subdivision level to be returned
virtual void AddLevel ( SubdivisionLevel pLevel,
bool  bFirst = false 
) [virtual]

Adds a subdivision level to the object.

Parameters:
[in] pLevel The subdivision level.
[in] bFirst true to add as the first level. (if there are no levels, this parameter is ignored)
virtual bool RemoveHighestLevel ( ) [virtual]

Removes the highest subdivision level from this geometry and deletes it.

Note that the active level cannot be removed. Returns true on success, false otherwise.

virtual SubdivisionLevel* ActiveLevel ( void  ) const [virtual]

Returns the active subdivision level. The active subdivision level is the level that.

is shown in the 3d viewport in Mudbox, and is the only level that is sculptable/paintable. Only one subdivision level is active at any time.

virtual bool ChangeActiveLevel ( const SubdivisionLevel pNewLevel ) [virtual]

Changes the active subdivision level. For example, to step up levels, you can do this:

pGeometry->ChangeActiveLevel( pGeometry->ActiveLevel()->NextLevel() ); Assuming you are not already on the highest level. This is equivalent to pressing Page Up in the Mudbox UI to step up to the next subdivision level. Returns true on success, false otherwise.

Parameters:
[in] pNewLevel A pointer to the subdivision level to be made active.
virtual unsigned int LayerCount ( ) const [virtual]

Returns the number of sculpt layers in this geometry.

virtual LayerMeshData* LayerData ( const QString &  sLayerName ) const [virtual]

Convenience method to return a pointer to the layer delta/mask data for the specified layer.

Returns NULL if there is no layer with the given name.

Parameters:
[in] sLayerName The layer name
virtual LayerMeshData* LayerData ( unsigned int  iLayer,
const SubdivisionLevel pLevel 
) const [virtual]

Returns a pointer to the layer delta/mask data for the specified layer.

Returns NULL if there is no layer data for the given subdivision level or if the layer index is out of range.

Parameters:
[in] iLayer Index to a sculpt layer.
[in] pLevel Pointer to the subdivision level for the layer data.
virtual mudbox::Material* Material ( void  ) const [virtual]

Returns the material associated with this geometry.

virtual void SetMaterial ( mudbox::Material pMaterial ) [virtual]

Sets the material associated with this geometry.

virtual mudbox::Material* MaterialOverride ( void  ) const [virtual]

Returns the material override associated with this geometry.

The override material is to be used as a temporary material in place of the normal material. Usage is typically as a highlight

virtual void SetMaterialOverride ( mudbox::Material pMaterialOverride ) [virtual]

Sets the override material. If set to NULL then normal material.

is used for rendering. If set then this material is used instead. used for temporary switching of materials.

virtual void SetActiveLevel ( SubdivisionLevel pNewActiveLevel ) [virtual]

Obsolete. Do not use this method. Use ChangeActiveLevel instead.

virtual int GeometryID ( void  ) const [virtual]

Returns the geometry ID. Geometry ID is used to make the operations that contain deleting and undo deleting geometry correct.

virtual void ImportUVs ( const Geometry pSource,
MatchMode  eMode = matchByVertexID,
float  fTolerance = 0.001f 
) [virtual]

Imports a UV set from pSource to this Geometry. Note this method fails if the active level of this geometry.

is not equal to level 0.

Parameters:
[in] pSource The source geometry to copy the UV set from
[in] eMode The matching mode that will be used. Only matchByVertexID, and matchByVertexPosition are valid for this method.
[in] fTolerance The tolerance when matching by vertex position

Member Data Documentation

This variable contains the address of the active level.

Plugins can use this attribute to catch level change events by connecting their own attribute of the same type.

See also:
Attribute::Connect()
Node::OnNodeEvent()

Definition at line 221 of file geometry.h.


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

Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry
Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry Geometry