Entity Class

Base class for all Eyeshot entities.
Public Class Entity 
Implements ISerializable, _ 
ICloneable, _ 
IDisposable, _ 
IEntity, _ 
ISelectableItem
This language is not supported or no code example is available.
public class Entity : ISerializable
ICloneable
IDisposable
IEntity
ISelectableItem
This language is not supported or no code example is available.
Name Description
Protected constructor Entity(Entity)
Public constructor Entity(Color, entityNatureType) Color and nature constructor.
Public constructor Entity(SerializationInfo, StreamingContext) Constructor for deserializing objects.
Public constructor Entity(entityNatureType) Nature only constructor.
Top
Name Description
Public property BoxMax Gets the maximum 3D extent of the entity.
Public property BoxMin Gets the minimum 3D extent of the entity.
Public property BoxSize Gets the 3D extent of the entity.
Public property Color Gets or sets the entity color.
Public property ColorMethod Gets or sets the entity color source.
Protected property Compiling Tells if the entity is being compiled.
Public property EntityData Gets or sets the entity custom data. If the type implements ICloneable it will be cloned when the Entity is cloned.
Public property GroupIndex Gets or sets the entity group index.
Public property LayerName Gets or sets the name of the referenced Layer.
Public property LineTypeMethod Gets or sets the entity line type source.
Public property LineTypeName Gets or sets the line type name of the Environment.LineTypes dictionary. In use only if the LineTypeMethod is byEntity.
Public property LineTypeScale Gets or sets the line type scale.
Public property LineWeight Gets or sets the entity line weight.
Public property LineWeightMethod Gets or sets the entity line weight source.
Public property MaterialName Gets or sets the entity material name.
Public property OrientedBounding A bounding volume that can fit the entity in a different orientation than AABB. It can be an OrientedBoundingBox or an OrientedBoundingRect(for planar entities). UpdateOrientedBoundingBox
Public property RegenMode Gets or sets the entity regeneration mode.
Public property Selectable Gets or sets the value that tells if the top-level item can be selected.
Public property Selected Gets or sets the entity selection status.
Public property Vertices Gets or sets entity's 3D vertices.
Public property Visible Gets or sets the entity visibility status for the top-level.
Public property XData Gets or sets the XData value list.
Internal protected (Protected Friend) property entityNature Gets or sets the nature of the entity.
Top
Methods
 
Name Description
Protected method AddVerticesToXElement(XElement) For internal use only.
Internal protected (Protected Friend) method AllVerticesInFrustum(FrustumParams)
Internal protected (Protected Friend) method AllVerticesInScreenPolygon(ScreenPolygonParams) Tells if an entity is fully contained inside a polygon defined in screen coordinates.
Internal protected (Protected Friend) method Animate(int) Gives a chance to derived classes to change the entity position/rotation at each timer tick.
Internal protected (Protected Friend) method CheckIsSmallArray(int) Ensures that the IsSmall array is big enough to hold data for the specified number of viewports.
Public method ClearSelectability(Stack<BlockReference>) Clear the entity selectability status for the defined nested instance.
Public method ClearSelectabilityForAllInstances() Clears the selectability status for all instances.
Public method ClearSelectionForAllInstances() Clears the selection status for all instances.
Public method ClearVisibility(Stack<BlockReference>) Clear the entity visibility status for the defined nested instance.
Public method ClearVisibilityForAllInstances() Clears the visibility status for all instances.
Public method Clone() Creates a deep copy of this entity.
Internal protected (Protected Friend) method CombineBoundingBox(Transformation, Point3D, Point3D) Combines the entity's bounding box with the given bounding box.
Public method Compile(CompileParams) Compiles the graphic representation of this entity.
Protected method CompilePattern(CompileParams) Compiles the graphics representation of the pattern of wireframe entities.
Protected method CompileWire(CompileParams) Compiles the graphics representation of wireframe entities.
Internal protected (Protected Friend) method ComputeBoundingBox(TraversalParams, out Point3D, out Point3D) Computes the entity's bounding box.
Protected method Static ComputeBoundingBox(TraversalParams, IList<Point3D>, out Point3D, out Point3D) Computes the entity's bounding box.
Protected method Static ComputeBoundingBox(TraversalParams, float[], int, out Point3D, out Point3D)
Internal protected (Protected Friend) method ComputeOffsetOnCameraAxes(OffsetOnCameraAxesParams) Computes the intersection of the lines passing from the vertices and oriented like the frustum planes with the X and Y axes of the camera.
Internal protected (Protected Friend) method Static ComputeOffsetOnCameraAxes(OffsetOnCameraAxesParams, IList<Point3D>, int)
Internal protected (Protected Friend) method Static ComputeOffsetOnCameraAxes(Transformation, float[], int, Point2D, Point2D, Point2D, Point2D, int)
Public method ConvertToSurrogate() Converts the entity to its surrogate, for serialization purpose.
Public method CopyAttributes(Entity) Copies the following attributes to this entity: Color, ColorMethod, LineWeight, LineTypePattern, LineTypeMethod, LineWeight, LineWeightMethod, LayerIndex and MaterialName.
Public method CopyAttributesFast(Entity) Copies the following attributes to this entity: Visible, InstanceVisibilityInfo, Color, ColorMethod, LayerIndex and MaterialName attributes.
Public method Dispose() Cleans up graphics resources, like display lists, textures, etc.
Internal protected (Protected Friend) method Draw(DrawParams) Draws the entity.
Internal protected (Protected Friend) method DrawDirection(DrawDirectionParams) Draws a small arrow to show the entity direction if DrawCurveDirection is true.
Internal protected (Protected Friend) method DrawEdges(DrawParams) Draws the entity's edges.
Protected method DrawEntity(RenderContextBase, object) Internal method that draws the entity.
Internal protected (Protected Friend) method DrawFast(DrawParams) Draws the entity in fast inaccurate transparency mode.
Internal protected (Protected Friend) method DrawFlat(DrawParams) Draws entity in displayType.Flat DisplayMode.
Internal protected (Protected Friend) method DrawFlatFast(DrawParams) Draws the entity in flat and fast inaccurate transparency mode.
Internal protected (Protected Friend) method DrawFlatSelected(DrawParams) Draws entity selected in displayType.Flat DisplayMode.
Internal protected (Protected Friend) method DrawForSelection(GfxDrawForSelectionParams) Draws the entity without specifing any color.
Internal protected (Protected Friend) method DrawForSelectionEdges(GfxDrawForSelectionParams) Draws the entity edges in false-colors (for some kinds of entities only).
Internal protected (Protected Friend) method DrawForSelectionFaces(GfxDrawForSelectionParams) Draws the entity faces in false-colors (for some kinds of entities only).
Internal protected (Protected Friend) method DrawForSelectionVertices(GfxDrawForSelectionParams) Draws the entity vertices in false-colors (for some kinds of entities only).
Internal protected (Protected Friend) method DrawForSelectionWireframe(GfxDrawForSelectionParams) Draws entity as wires without specifing any color.
Internal protected (Protected Friend) method DrawForShadow(RenderParams) Draws the entity planar shadow.
Internal protected (Protected Friend) method DrawHiddenLines(DrawParams) Draw the entity in the displayType.HiddenLines display mode.
Internal protected (Protected Friend) method DrawHiddenLinesFast(DrawParams) Draw the entity in the displayType.HiddenLines display mode in fast inaccurate transparency mode.
Internal protected (Protected Friend) method DrawHiddenLinesMaterial(RenderParams)
Internal protected (Protected Friend) method DrawHiddenLinesMaterialFast(RenderParams)
Internal protected (Protected Friend) method DrawIsocurves(DrawParams) Draws the entity iso curves. For Mesh entities this method draws internal wires.
Internal protected (Protected Friend) method DrawIsocurvesForFlat(DrawParams) Draws the isocurves in Flat display mode.
Internal protected (Protected Friend) method DrawNormals(DrawParams) Draws entity's normal vectors.
Internal protected (Protected Friend) method DrawOnScreen(DrawOnScreenParams) Draws extra things on screen, like the vertex indices (if Viewport.ShowVertexIndices is true).
Internal protected (Protected Friend) method DrawOnScreen(DrawOnScreenParams, int) Draws extra things on screen, like the vertex indices (if Viewport.ShowVertexIndices is true).
Internal protected (Protected Friend) method DrawOnScreenWireframe(DrawOnScreenWireframeParams) Draws extra things on screen, like the vertex Numbers (if Viewport.ShowVertexIndices is true) in wireframe display mode.
Internal protected (Protected Friend) method DrawOnScreenWireframe(DrawOnScreenWireframeParams, int) Draws extra things on screen, like the vertex Numbers (if Viewport.ShowVertexIndices is true) in wireframe dispaly mode.
Internal protected (Protected Friend) method DrawSelected(DrawParams) Draws entity selected.
Internal protected (Protected Friend) method DrawSelectedVertices(DrawParams) Draws the entity selected vertices.
Internal protected (Protected Friend) method DrawSilhouettes(DrawSilhouettesParams) Draws Silhouettes.
Internal protected (Protected Friend) method DrawVertices(DrawParams) Draws entity's vertices.
Protected method DrawWire(DrawParams) Draws a wireframe entity, resolving the LineTypeName for LineTypeMethod colorMethodType.byParent.
Protected method DrawWireEntity(RenderContextBase, object) Draws the Wireframe entity.
Internal protected (Protected Friend) method DrawWireframe(DrawParams) Draws entity as wires.
Internal protected (Protected Friend) method DrawWireframeSelected(DrawParams) Draws entity as selected wires.
Protected method DrawWithPattern(RenderContextBase, object)
Public method Dump() Returns a description of this entity.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (inherited from Object).
Public method EstimateBoundingBox(BlockKeyedCollection, LayerKeyedCollection) Returns a small set of points that gives an idea of the entity bounding box.
Protected method EvaluateIntersectEdges(FrustumParams) Tells if must evaluate the intersection of the edges with the frustum.
Protected method EvaluateIntersectTriangles(FrustumParams) Tells if must evaluate the intersection of the triangles with the frustum.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Internal protected (Protected Friend) method FindClosestTriangle(Transformation, Segment3D, IList<Point3D>, IList<IndexTriangle>, int, int, int, SortedList<DoubleHitTriangle>) Finds the triangles intersecting the seg segment and puts them in the triList.
Protected method FindClosestTriangle(Transformation, Segment3D, float[], int[], int, int, int, SortedList<DoubleHitTriangle>) Finds the closest triangle using float arrays for vertices and int arrays for triangles.
Protected method Static FrustumEdgesTriangleIntersection(Segment3D[], Point3D, Point3D, Point3D)
Protected method Static GetClosestMainAxis(Vector3D)
Public method GetHashCode Serves as the default hash function. (inherited from Object).
Protected method GetNormalLength() Gets the entity normal length.
Public method GetObjectData(SerializationInfo, StreamingContext) Populates a SerializationInfo instance with the data needed to serialize the target object.
Protected method Static GetOffsetDistance(Vector3D, Vector3D, double) Computes the offset distance for the extrude with draft angle methods.
Public method GetSelectability(Stack<BlockReference>) Gets the entity selectability status.
Public method GetSelection(Stack<BlockReference>) Gets the entity selection status.
Public method GetType Gets the Type of the current instance. (inherited from Object).
Public method GetVisibility(Stack<BlockReference>) Gets the entity visibility status.
Protected method GetXAttributes(bool) For internal use only.
Public method GetXElement(bool) For internal use only.
Protected method InitGraphicsData() Initialize the graphics data.
Internal protected (Protected Friend) method Static InsideFrustumPoint(PlaneEquation[], Transformation, IList<Point3D>, int)
Internal protected (Protected Friend) method InsideOrCrossingFrustum(FrustumParams)
Internal protected (Protected Friend) method Static InsideOrCrossingFrustumInternal(PlaneEquation[], Transformation, IList<Point3D>, int, int)
Internal protected (Protected Friend) method InsideOrCrossingScreenPolygon(ScreenPolygonParams)
Internal protected (Protected Friend) method Static InsideOrCrossingScreenPolygonInternal(ScreenPolygonParams, IList<Point3D>, int, int)
Internal protected (Protected Friend) method Static InsideOrCrossingScreenPolygonPoint(ScreenPolygonParams, IList<Point3D>, int)
Internal protected (Protected Friend) method Intersects(Entity, bool, Transformation, Transformation) Checks if two entity intersect geometrically
Internal protected (Protected Friend) method Intersects2D(Entity, bool, Transformation, Transformation) Checks if two 2D entity intersect geometrically on Plane XY
Public method IsAnyInstanceSelectable() Tells if there is at least an instance selectable.
Public method IsAnyInstanceSelected() Tells if there is at least an instance selected.
Public method IsAnyInstanceVisible() Tells if there is at least an instance visible.
Internal protected (Protected Friend) method IsCrossing(FrustumParams) Tells if the entity is inside or crossing the given planes and edges.
Internal protected (Protected Friend) method IsCrossingScreenPolygon(ScreenPolygonParams) Tells if an entity is fully or partially contained inside a polygon defined in screen coordinates.
Public method IsInFrustum(FrustumParams) Tells if the entity is inside the frustum planes.
Public method IsInFrustum(FrustumParams, Point3D, double) Tells if the sphere surrounding the entity is inside the frustum planes.
Public method IsSelected(Stack<BlockReference>) Obsolete. Tells if the instance referred by the stack of parents is selected.
Internal protected (Protected Friend) method IsSmall(IsSmallParams) Checks if an entity is small and can be skipped during the drawing.
Public method IsSmall(int) Tells if the entity screen size is smaller than Environment.SmallSize.
Public method IsValid() Returns true if all the entity fields contain reasonable information.
Internal protected (Protected Friend) method IsVisible(LayerKeyedCollection, attributeReferenceVisibilityType) Check if the entity is visible for the selection.
Internal protected (Protected Friend) method IsVisibleAndInFrustum(Stack<BlockReference>, LayerKeyedCollection, attributeReferenceVisibilityType) Check if the entity is visible.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Internal protected (Protected Friend) method Static PropagateAttributes(Entity, Entity, bool) Propagates the attributes to the entity passed as parameter.
Public method Regen(RegenParams) This method is used for several purposes. For example in arcs and circles is used to generate the curve's linear approximation, in meshes to compute normals and edges and in Nurbs surfaces to generate the triangulation.
Public method Regen(double) Computes the curve or surface tessellation.
Public method RegenNoChanges(double) Computes an array of vertices according to the desired chordal error, without changing the entity's Vertices and RegenMode.
Internal protected (Protected Friend) method Render(RenderParams) Renders the entity.
Internal protected (Protected Friend) method RenderFast(RenderParams) Renders the entity in fast inaccurate transparency mode.
Internal protected (Protected Friend) method ResetIsSmallArray() Resets the array of IsSmall flags.
Public method Rotate(double, Vector3D, Point3D) Rotates the entity around an arbitray axis by the specified angle.
Public method Scale(Point3D, double, double, double) Scales the entity of the specified scale factor.
Public method Scale(Point3D, double) Scales the entity of the specified scale factor.
Public method Scale(Vector3D) Scales the entity of the specified scale factor.
Public method Scale(double) Scales the entity of the specified scale factor.
Public method Scale(double, double, double) Scales the entity of the specified scale factor.
Internal protected (Protected Friend) method SelectedInternal() Tells if the entity has internal parts selected
Internal protected (Protected Friend) method Static SetEntityColorForFace(DrawParams, Color) Sets the entity color or material depending on the color mode.
Internal protected (Protected Friend) method Static SetEntityColorForSelection(DrawParams) Sets the entity color or material depending on the color mode.
Public method SetLineWeight(RenderContextBase, float) Line weight changer.
Internal protected (Protected Friend) method SetLineWeightForEdges(DrawEdgesParams)
Internal protected (Protected Friend) method SetLineWeightForSilhouettes(DrawSilhouettesParams)
Public method SetSelectability(bool, Stack<BlockReference>) Sets the entity selectability status.
Public method SetSelection(bool, Stack<BlockReference>) Sets the entity selection status.
Internal protected (Protected Friend) method Static SetSelectionColorForSelection(DrawParams) Sets the selection color or material depending on the color mode.
Internal protected (Protected Friend) method SetShader(DrawParams) Sets a Shader before drawing the entity.
Public method SetVisibility(bool, Stack<BlockReference>) Sets the entity visibility status.
Internal protected (Protected Friend) method ThroughTriangle(FrustumParams)
Public method Static ThroughTriangleQuad(FrustumParams, IList<Point3D>) Tells if the quad defined by the vertices is inside the selection area defined by the edge list.
Internal protected (Protected Friend) method ThroughTriangleScreenPolygon(ScreenPolygonParams)
Protected method Static ThroughTriangleScreenPolygon(Point3D, Point3D, Point3D, ScreenPolygonParams) Checks whether a triangle intersects or is inside a 2D screen polygon.
Public method Static ThroughTriangleScreenPolygonQuad(IList<Point3D>, ScreenPolygonParams) Tells if the quad defined by the vertices is inside the selection area defined by the screen polygon.
Public method ToString Returns a string that represents the current object. (inherited from Object).
Internal protected (Protected Friend) method TransformAllVertices(Transformation, bool, bool)
Public method TransformBy(Transformation) Transforms all the entity's vertices by the specified transformation.
Public method Translate(double, double, double) Translates the entity.
Public method Translate(Vector3D) Translates the entity.
Public method UpdateBoundingBox(TraversalParams) Updates the entity's bounding box.
Internal protected (Protected Friend) method UpdateBoundingBoxSphere()
Public method UpdateOrientedBoundingBox(TraversalParams) Updates the entity's oriented bounding box or build it if not present.
Public method UpdateOrientedBoundingBox(TraversalParams, bool) Updates the entity's oriented bounding box or build it if not present.
Protected method WriteObjAsLines(ref int, TextWriter, ref int, ref int, ref int, TextWriter, LayerKeyedCollection, string, MaterialKeyedCollection, double, double, BlockKeyedCollection) Write in Obj file format as set of lines connecting vertices.
Internal protected (Protected Friend) method WriteUsemtl(int, TextWriter, TextWriter, LayerKeyedCollection)
Protected method WriteUsemtl(string, TextWriter)
Top
Fields
 
Name Description
Protected field _localOB
Internal protected (Protected Friend) field drawData Default graphics data.
Internal protected (Protected Friend) field drawPattern Graphics data for line pattern.
Top

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition