pCon.planner Plugin SDK  Version 8.9
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Properties | List of all members
X3g::Plugin::DbMesh Class Reference

A DbMesh is a collection of polygons used to define a 3D object. More...

Inheritance diagram for X3g::Plugin::DbMesh:
Inheritance graph
[legend]

Public Member Functions

 DbMesh (Block^ pOwner)
 Create a DbMesh as child of the given block. More...
 
void SetMesh (array< GeVec3d >^pVertices, array< int >^pFaces)
 Sets the mesh vertices and faces. More...
 
array< GeVec3d >^ GetVertices ()
 Returns a copy of the mesh vertices. More...
 
array< int >^ GetFaces ()
 Returns a copy of the mesh faces. More...
 
array< GeVec3d >^ GetNormals ()
 Returns a copy of the vertex normals. More...
 
void SetNormals (array< GeVec3d >^pNormals)
 Sets the vertex normals. More...
 
array< GeVec2d >^ GetTexCoords ()
 Returns a copy of the vertex texture coordinates. More...
 
void SetTexCoords (array< GeVec2d >^pTexCoords)
 Sets vertex texture coordinates. More...
 
- Public Member Functions inherited from X3g::Plugin::DbEntity
GeMatrixGetTextureMatrix ()
 The texture matrix determines how to map the material texture to the entity. More...
 
void SetTextureMatrix (GeMatrix^ pMatrix)
 Sets the texture matrix. More...
 
bool TransformBy (GeMatrix^ pTransform)
 Transforms the entity. More...
 
GeMatrixGetTransientTransform ()
 Returns transient transformation of this entity. More...
 
void SetTransientTransform (GeMatrix^ pTransform)
 Sets the transient transformation of this entity. More...
 
void UpdateGeometry ()
 Updates the geometry of the entity. More...
 
void Delete ()
 Deletes the entity from the document. More...
 
GeBoundingBox3dGetBoundingBox (GeMatrix^ pTransform)
 Returns bounding box of entity within the owning blocks local coordinate system. More...
 
IPropertyProvider^ GetPropertyProvider ()
 Returns property provider of the entity. More...
 
DbEntityClone (Block^ pOwner)
 Creates a clone of the entity. More...
 
DbEntityCut2 (DbEntity^ pEntity)
 Subtracts pEntity from this object. More...
 
DbEntityCut2 (DbEntity^ pEntity, Block^ pToOwner)
 Subtracts pEntity from this object. More...
 
DbEntityCommon2 (DbEntity^ pEntity)
 Computes an object which represents all common geometry of this entity and pEntity. More...
 
DbEntityCommon2 (DbEntity^ pEntity, Block^ pToOwner)
 Computes an object which represents all common geometry of this entity and pEntity. More...
 
DbEntityFuse2 (DbEntity^ pEntity)
 Computes an object by merging all geometry of this entity and pEntity. More...
 
DbEntityFuse2 (DbEntity^ pEntity, Block^ pToOwner)
 Computes an object by merging all geometry of this entity and pEntity. More...
 
List< DbEntity^ >^ Slice (GePlane^ pPlane, bool pKeepBothHalves)
 Slice the DbEntity with the plane. More...
 
DbEntityPartialMove (GePlane^ pPlane, double pLength)
 Strech or shrink the DbEntity at the given plane. More...
 
void AddCallbacks (DbEntityCallbacks^ pCallbacks)
 Add callbacks to the entity. More...
 
void RemoveCallbacks (DbEntityCallbacks^ pCallbacks)
 Remove callbacks from entity. More...
 

Properties

bool SingleSided [get, set]
 If enabled the triangles will be rendered single sided. More...
 
double EdgeSoftening [get, set]
 Control the visibility of edges within the Mesh. More...
 
- Properties inherited from X3g::Plugin::DbEntity
String^  Id [get]
 The unqiue id of the entity. More...
 
String^  Name [get, set]
 User-defined name of the entity. More...
 
String^  Material [get, set]
 Material of this entity. More...
 
EntityColor Color [get, set]
 Color of this entity. More...
 
String^  Layer [get, set]
 Layer name of this entity. More...
 
String^  OwningBlock [get]
 Name of the block that owns this entity. More...
 
bool TopLevel [get]
 Returns if entity is owned by modelspace. More...
 
bool Valid [get]
 Returns if entity is valid and not erased. More...
 
DbTextureProjection TextureProjection [get, set]
 The AutoCAD texture projection. More...
 
bool IsModelingSupported [get]
 If true the entity can be used with modeling functions. More...
 
bool Locked [get, set]
 Lock status of this entity. More...
 
GeVec2d LayoutPosition [get, set]
 Position the Entity in Layout. More...
 
DbDictionary^  CustomData [get]
 Allows to attach custom data to the entity. More...
 
String^  CustomType [get, set]
 Allows plugins to identify their entities. More...
 
Object^  CustomObject
 Allows to attach an object which extents the entity (e.g. More...
 
bool IsVisible [get, set]
 Visibility of this entity. More...
 
Hyperlink Link [get, set]
 Get or Set the Hyperlink attached to the DbEntity. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from X3g::Plugin::DbEntity
static DbEntityFromId (String^ pEntityId)
 Creates DbEntity to given entity id. More...
 
- Package Functions inherited from X3g::Plugin::DbEntity
 DbEntity (Block^ pOwner, EntityImpl *pImpl)
 This constructor is used to create new OdDbEntities and add to a block. More...
 
 DbEntity (Layout::Page^ pPage, EntityImpl *pImpl)
 This constructor is used to create new OdDbEntities and add to a page. More...
 
- Events inherited from X3g::Plugin::DbEntity
System::EventHandler^  VisibilityChanged
 Occurs when DbEntity::IsVisible changed. More...
 

Detailed Description

A DbMesh is a collection of polygons used to define a 3D object.

Constructor & Destructor Documentation

X3g::Plugin::DbMesh::DbMesh ( Block pOwner)

Create a DbMesh as child of the given block.

Member Function Documentation

array< int > X3g::Plugin::DbMesh::GetFaces ( )

Returns a copy of the mesh faces.

array< GeVec3d > X3g::Plugin::DbMesh::GetNormals ( )

Returns a copy of the vertex normals.

array< GeVec2d > X3g::Plugin::DbMesh::GetTexCoords ( )

Returns a copy of the vertex texture coordinates.

array< GeVec3d > X3g::Plugin::DbMesh::GetVertices ( )

Returns a copy of the mesh vertices.

void X3g::Plugin::DbMesh::SetMesh ( array< GeVec3d >^  pVertices,
array< int >^  pFaces 
)

Sets the mesh vertices and faces.

Faces are defined by vertex indices as follows: [num indices], i1, i2, i3, ... [num indices], i1, i2, i3,.... Example: Triangle and Rectangle ([3], 0, 1, 2, [4], 3, 4, 2, 1)

void X3g::Plugin::DbMesh::SetNormals ( array< GeVec3d >^  pNormals)

Sets the vertex normals.

The number of normals must be zero or match the number of vertices.

void X3g::Plugin::DbMesh::SetTexCoords ( array< GeVec2d >^  pTexCoords)

Sets vertex texture coordinates.

The number of texture coordinates must be zero or match the number of vertices. This is a planner extension and has no effect in other DWG viewers. TextureMatrix and TextureProjection have no effect (except for other DWG viewers) when this field is used.

Property Documentation

double X3g::Plugin::DbMesh::EdgeSoftening
getset

Control the visibility of edges within the Mesh.

The value is in degree between adjacent faces. Value of 0 shows all edges.

bool X3g::Plugin::DbMesh::SingleSided
getset

If enabled the triangles will be rendered single sided.

Single sided rendering improves memory consumption and rendering performance but in general it is suitable for closed meshes only. Disabled by default.