Class VisualObjectHelper
Inheritance
VisualObjectHelper
Assembly: CAMAPI.DotnetHelper.dll
Syntax
public static class VisualObjectHelper
Methods
AddHotSpot(ComWrapper<ICamApiInteractiveVO>, TST3DPoint)
Add a draggable handle; returns the handle id used in callbacks.
Declaration
public static int AddHotSpot(this ComWrapper<ICamApiInteractiveVO> com, TST3DPoint p)
Parameters
Returns
AddInstance(ComWrapper<ICamApiInstancedVO>, TST3DMatrix)
Add a placement (a transform on top of the object's own) at which the mesh is drawn again.
Declaration
public static void AddInstance(this ComWrapper<ICamApiInstancedVO> com, TST3DMatrix transform)
Parameters
AddMesh(ComWrapper<ICamApiRenderableVO>, ComWrapper<ICamApiMeshBuilder>)
Append a prebuilt mesh in one call using the current color (cached on the GPU).
Declaration
public static void AddMesh(this ComWrapper<ICamApiRenderableVO> com, ComWrapper<ICamApiMeshBuilder> builder)
Parameters
AddPolyline(ComWrapper<ICamApiRenderableVO>, ReadOnlySpan<double>, bool)
Add a whole polyline in one call (X,Y,Z per point), the bulk alternative to
BeginPolyline + per-point AddPolylinePoint + EndPolyline - the fast path for
large contours. closed connects the last point to the first. The span is
pinned for the duration of the call; the kernel copies the data.
Declaration
public static void AddPolyline(this ComWrapper<ICamApiRenderableVO> com, ReadOnlySpan<double> coords, bool closed)
Parameters
AddPolylinePoint(ComWrapper<ICamApiRenderableVO>, TST3DPoint)
Add a point to the current polyline.
Declaration
public static void AddPolylinePoint(this ComWrapper<ICamApiRenderableVO> com, TST3DPoint p)
Parameters
AsCustomPass(ComWrapper<ICamApiVisualObject>)
Render-pass aspect (overlay / transparency) of this object, or a null wrapper
if it has none (e.g. a gizmo). Shares the source's RCW - do not use past the
source wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiCustomPassVO> AsCustomPass(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
AsGizmo(ComWrapper<ICamApiVisualObject>)
Manipulator aspect of this object, or a null wrapper if it is not a gizmo.
Shares the source's RCW - do not use past the source wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiGizmo> AsGizmo(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
AsInstanced(ComWrapper<ICamApiVisualObject>)
Instancing aspect (draw the object's mesh at several placements) of this
object, or a null wrapper if it has none (e.g. a gizmo). Shares the source's
RCW - do not use past the source wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiInstancedVO> AsInstanced(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
AsInteractive(ComWrapper<ICamApiVisualObject>)
Interactivity aspect (selection, hotspots) of this object, or a null wrapper
if it has none (e.g. a gizmo). Shares the source's RCW - do not use past the
source wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiInteractiveVO> AsInteractive(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
AsMaterial(ComWrapper<ICamApiVisualObject>)
Material aspect (face lighting model) of this object, or a null wrapper if it
has none (e.g. a gizmo). Shares the source's RCW - do not use past the source
wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiMaterialVO> AsMaterial(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
AsRenderable(ComWrapper<ICamApiVisualObject>)
Drawable content aspect (color, meshes, polylines) of this object, or a null
wrapper if it has none (e.g. a gizmo). Shares the source's RCW - do not use
past the source wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiRenderableVO> AsRenderable(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
AsShaded(ComWrapper<ICamApiVisualObject>)
Custom-shading aspect (typed uniforms fed to the built-in face shader) of this
object, or a null wrapper if it has none (e.g. a gizmo). Shares the source's
RCW - do not use past the source wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiShadedVO> AsShaded(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
AsTextured(ComWrapper<ICamApiVisualObject>)
Texture aspect (image mapped onto faces via UV) of this object, or a null
wrapper if it has none (e.g. a gizmo). Shares the source's RCW - do not use
past the source wrapper's lifetime.
Declaration
public static ComWrapper<ICamApiTexturedVO> AsTextured(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
BeginPolyline(ComWrapper<ICamApiRenderableVO>, bool)
Begin a polyline (closed connects the last point to the first).
Declaration
public static void BeginPolyline(this ComWrapper<ICamApiRenderableVO> com, bool closed)
Parameters
Clear(ComWrapper<ICamApiRenderableVO>)
Drop all primitives so the object's content can be rebuilt.
Declaration
public static void Clear(this ComWrapper<ICamApiRenderableVO> com)
Parameters
ClearHotSpots(ComWrapper<ICamApiInteractiveVO>)
Remove all handles from this object.
Declaration
public static void ClearHotSpots(this ComWrapper<ICamApiInteractiveVO> com)
Parameters
ClearInstances(ComWrapper<ICamApiInstancedVO>)
Remove all instance placements so the object draws once at its own transform.
Declaration
public static void ClearInstances(this ComWrapper<ICamApiInstancedVO> com)
Parameters
EndPolyline(ComWrapper<ICamApiRenderableVO>)
Finish the current polyline.
Declaration
public static void EndPolyline(this ComWrapper<ICamApiRenderableVO> com)
Parameters
GetInstanceCount(ComWrapper<ICamApiInstancedVO>)
Number of instance placements currently added.
Declaration
public static int GetInstanceCount(this ComWrapper<ICamApiInstancedVO> com)
Parameters
Returns
Object placement transform.
Declaration
public static TST3DMatrix GetTransform(this ComWrapper<ICamApiVisualObject> com)
Parameters
Returns
SetColor(ComWrapper<ICamApiRenderableVO>, int, int, int, int)
Set the current color (0..255) for subsequent primitives.
Declaration
public static void SetColor(this ComWrapper<ICamApiRenderableVO> com, int r, int g, int b, int a)
Parameters
SetInteractionHandler(ComWrapper<ICamApiInteractiveVO>, ICamApiViewInteractionHandler)
Set the handler that receives hotspot drag events (null to detach).
Declaration
public static void SetInteractionHandler(this ComWrapper<ICamApiInteractiveVO> com, ICamApiViewInteractionHandler handler)
Parameters
SetLit(ComWrapper<ICamApiMaterialVO>, bool)
Face lighting model: true = shaded by scene lights (default), false = flat/unlit.
Declaration
public static void SetLit(this ComWrapper<ICamApiMaterialVO> com, bool value)
Parameters
SetOverlay(ComWrapper<ICamApiCustomPassVO>, bool)
Draw the faces on top of the scene with depth testing off.
Declaration
public static void SetOverlay(this ComWrapper<ICamApiCustomPassVO> com, bool value)
Parameters
SetPreset(ComWrapper<ICamApiMaterialVO>, TCamApiMaterialPreset)
Built-in shading preset for lit faces (Standard by default); ignored when unlit.
Declaration
public static void SetPreset(this ComWrapper<ICamApiMaterialVO> com, TCamApiMaterialPreset value)
Parameters
SetSelectable(ComWrapper<ICamApiInteractiveVO>, bool)
When set, the object can be picked by clicking its geometry.
Declaration
public static void SetSelectable(this ComWrapper<ICamApiInteractiveVO> com, bool value)
Parameters
SetSpecularWeight(ComWrapper<ICamApiShadedVO>, double)
Specular highlight strength of lit faces: 1.0 default, 0.0 fully diffuse, higher = stronger.
Declaration
public static void SetSpecularWeight(this ComWrapper<ICamApiShadedVO> com, double value)
Parameters
SetTextureFromFile(ComWrapper<ICamApiTexturedVO>, string)
Map an image file (PNG / JPG / BMP / TGA) onto the object's faces via their
UV coordinates; pass an empty path to drop the texture. Textured faces are
drawn unlit, modulated by the current color.
Declaration
public static void SetTextureFromFile(this ComWrapper<ICamApiTexturedVO> com, string filePath)
Parameters
Object placement transform.
Declaration
public static void SetTransform(this ComWrapper<ICamApiVisualObject> com, TST3DMatrix value)
Parameters
SetTransparent(ComWrapper<ICamApiCustomPassVO>, bool)
Blend the faces with the framebuffer using the colour alpha.
Declaration
public static void SetTransparent(this ComWrapper<ICamApiCustomPassVO> com, bool value)
Parameters
SetVisible(ComWrapper<ICamApiVisualObject>, bool)
Declaration
public static void SetVisible(this ComWrapper<ICamApiVisualObject> com, bool value)
Parameters