Viewer Module
3D visualization and interaction.
LightOcct::LContext
Interactive context for Light OCCT viewer Manages display and selection of shapes and interactive objects
#include <light-occt/viewer/LContext.hxx>Quick Reference
Methods: Display(), Display(), Display(), Erase(), EraseAll(), Redisplay(), UpdateCurrentViewer(), SetColor(), SetMaterial(), SetTransparency(), SetDisplayMode(), SetLineWidth(), SetSelectionMode(), AddSelectionMode(), RemoveSelectionMode(), ClearSelectionModes(), GetSelectedShapes(), Select(), AddOrRemoveSelected(), ClearSelected(), IsSelected(), NbSelected(), Highlight(), Unhighlight(), IsHighlighted(), GetHighlighted(), SetSelected(), SetCurrentObject(), HasSelectedShape(), FirstSelectedShape(), GetDisplayedShapes(), IsDisplayed(), FitAllObjects(), OpenLocalContext(), CloseLocalContext(), CloseAllContexts(), HasOpenedContext(), SetZLayer(), IsolateShape(), UnisolateAll(), IsValid(), SetPixelTolerance(), GetPixelTolerance(), SetAutoActivateSelection(), GetAutoActivateSelection(), LContext(), ~LContext(), LContext(), operator=()
Enums: DisplayMode, SelectionMode
Methods
Instance Methods
Display
void Display(const & LShape shape, bool updateViewer) const;Display
void Display(const & LShape shape, const & Color color, bool updateViewer) const;Display
void Display(const & LShape shape, const & Material material, bool updateViewer) const;Erase
void Erase(const & LShape shape, bool updateViewer) const;EraseAll
void EraseAll(bool updateViewer) const;Redisplay
void Redisplay(const & LShape shape, bool updateViewer) const;UpdateCurrentViewer
void UpdateCurrentViewer() const;SetColor
void SetColor(const & LShape shape, const & Color color, bool updateViewer) const;SetMaterial
void SetMaterial(const & LShape shape, const & Material material, bool updateViewer) const;SetTransparency
void SetTransparency(const & LShape shape, double transparency, bool updateViewer) const;SetDisplayMode
void SetDisplayMode(const & LShape shape, DisplayMode mode, bool updateViewer) const;SetLineWidth
void SetLineWidth(const & LShape shape, double width, bool updateViewer) const;SetSelectionMode
void SetSelectionMode(SelectionMode mode) const;AddSelectionMode
void AddSelectionMode(SelectionMode mode) const;RemoveSelectionMode
void RemoveSelectionMode(SelectionMode mode) const;ClearSelectionModes
void ClearSelectionModes() const;GetSelectedShapes
std::vector< > LShape GetSelectedShapes() const;Select
void Select(const & LShape shape, bool updateViewer) const;AddOrRemoveSelected
void AddOrRemoveSelected(const & LShape shape, bool updateViewer) const;ClearSelected
void ClearSelected(bool updateViewer) const;IsSelected
bool IsSelected(const & LShape shape) const;NbSelected
int NbSelected() const;Highlight
void Highlight(const & LShape shape, const & Color color, bool updateViewer) const;Unhighlight
void Unhighlight(const & LShape shape, bool updateViewer) const;IsHighlighted
bool IsHighlighted(const & LShape shape) const;GetHighlighted
std::vector< > LShape GetHighlighted() const;SetSelected
void SetSelected(const & LShape shape, bool updateViewer) const;SetCurrentObject
void SetCurrentObject(const & LShape shape, bool updateViewer) const;HasSelectedShape
bool HasSelectedShape() const;FirstSelectedShape
LShape FirstSelectedShape() const;GetDisplayedShapes
std::vector< > LShape GetDisplayedShapes() const;IsDisplayed
bool IsDisplayed(const & LShape shape) const;FitAllObjects
void FitAllObjects(const & LView view, double margin) const;OpenLocalContext
void OpenLocalContext(bool useDisplayedObjects, bool allowShapeDecomposition) const;CloseLocalContext
void CloseLocalContext(int index, bool updateViewer) const;CloseAllContexts
void CloseAllContexts(bool updateViewer) const;HasOpenedContext
bool HasOpenedContext() const;SetZLayer
void SetZLayer(const & LShape shape, int layer) const;IsolateShape
void IsolateShape(const & LShape shape, bool updateViewer) const;UnisolateAll
void UnisolateAll(bool updateViewer) const;IsValid
bool IsValid() const;SetPixelTolerance
void SetPixelTolerance(int tolerance) const;GetPixelTolerance
int GetPixelTolerance() const;SetAutoActivateSelection
void SetAutoActivateSelection(bool enable) const;GetAutoActivateSelection
bool GetAutoActivateSelection() const;LContext
LContext() const;~LContext
~LContext() const;LContext
LContext(const & LContext other) const;operator=
& LContext operator=(const & LContext other) const;Enumerations
DisplayMode
enum DisplayMode {
DISPLAY_WIREFRAME
DISPLAY_SHADED
};SelectionMode
enum SelectionMode {
SELECTION_SHAPE
SELECTION_VERTEX
SELECTION_EDGE
SELECTION_WIRE
SELECTION_FACE
SELECTION_SHELL
SELECTION_SOLID
SELECTION_COMPOUND
};LightOcct::LView
View class for Light OCCT Represents a single view window in the viewer
#include <light-occt/viewer/LView.hxx>Quick Reference
Fields: myProjectionType, myName, myWidth, myHeight
Methods: SetProjection(), GetProjection(), SetViewOrientation(), FitAll(), ZoomWindow(), Pan(), Rotate(), Zoom(), SetZoom(), GetZoom(), SetEye(), SetAt(), SetUp(), GetEye(), GetAt(), GetUp(), StartRotation(), Rotation(), SetScale(), GetScale(), Redraw(), MustBeResized(), UpdateLights(), SetBackgroundColor(), SetGradientBackground(), SetWindow(), SetSize(), GetSize(), IsActive(), Activate(), ShowTrihedron(), SetTrihedronSize(), ShowGraduatedTrihedron(), AddClippingPlane(), RemoveAllClippingPlanes(), SetClippingPlaneActive(), SetShadingModel(), SetVisualization(), EnableAntiAliasing(), Dump(), DumpToImageData(), MoveTo(), Select(), SelectArea(), ClearSelected(), IsValid(), GetName(), LView(), ~LView(), LView(), operator=()
Enums: ProjectionType, ViewOrientation
Fields
myProjectionType
ProjectionType myProjectionType;myName
std::string myName;myWidth
int myWidth;myHeight
int myHeight;Methods
Instance Methods
SetProjection
void SetProjection(ProjectionType type) const;GetProjection
ProjectionType GetProjection() const;SetViewOrientation
void SetViewOrientation(ViewOrientation orientation) const;FitAll
void FitAll(double margin) const;ZoomWindow
void ZoomWindow(int x1, int y1, int x2, int y2) const;Pan
void Pan(int dx, int dy) const;Rotate
void Rotate(int dx, int dy) const;Zoom
void Zoom(double factor) const;SetZoom
void SetZoom(double zoom) const;GetZoom
double GetZoom() const;SetEye
void SetEye(const & Point eye) const;SetAt
void SetAt(const & Point at) const;SetUp
void SetUp(const & Vector up) const;GetEye
Point GetEye() const;GetAt
Point GetAt() const;GetUp
Vector GetUp() const;StartRotation
void StartRotation(int x, int y) const;Rotation
void Rotation(int x, int y) const;SetScale
void SetScale(double scale) const;GetScale
double GetScale() const;Redraw
void Redraw() const;MustBeResized
void MustBeResized() const;UpdateLights
void UpdateLights() const;SetBackgroundColor
void SetBackgroundColor(const & Color color) const;SetGradientBackground
void SetGradientBackground(const & Color topColor, const & Color bottomColor) const;SetWindow
void SetWindow(void * windowHandle) const;SetSize
void SetSize(int width, int height) const;GetSize
void GetSize(int & width, int & height) const;IsActive
bool IsActive() const;Activate
void Activate() const;ShowTrihedron
void ShowTrihedron(bool show) const;SetTrihedronSize
void SetTrihedronSize(double size) const;ShowGraduatedTrihedron
void ShowGraduatedTrihedron(bool show) const;AddClippingPlane
void AddClippingPlane(const & Point origin, const & Vector normal) const;RemoveAllClippingPlanes
void RemoveAllClippingPlanes() const;SetClippingPlaneActive
void SetClippingPlaneActive(int index, bool active) const;SetShadingModel
void SetShadingModel(int model) const;SetVisualization
void SetVisualization(int mode) const;EnableAntiAliasing
void EnableAntiAliasing(bool enable) const;Dump
bool Dump(const std::string & filename, int width, int height) const;DumpToImageData
bool DumpToImageData(unsigned char * buffer, int width, int height) const;MoveTo
void MoveTo(int x, int y) const;Select
void Select(int x, int y) const;SelectArea
void SelectArea(int x1, int y1, int x2, int y2) const;ClearSelected
void ClearSelected() const;IsValid
bool IsValid() const;GetName
std::string GetName() const;LView
LView() const;~LView
~LView() const;LView
LView(const & LView other) const;operator=
& LView operator=(const & LView other) const;Enumerations
ProjectionType
enum ProjectionType {
PROJECTION_ORTHOGRAPHIC
PROJECTION_PERSPECTIVE
PROJECTION_STEREO
};ViewOrientation
enum ViewOrientation {
VIEW_TOP
VIEW_BOTTOM
VIEW_FRONT
VIEW_BACK
VIEW_LEFT
VIEW_RIGHT
VIEW_ISOMETRIC
};LightOcct::LViewer
Main viewer class for Light OCCT Provides high-level interface for 3D visualization
#include <light-occt/viewer/LViewer.hxx>Quick Reference
Fields: myType, myRenderingMode, myName
Factory Methods: CreateDesktopViewer()
Methods: CreateView(), RemoveView(), UpdateAllViews(), SetDefaultLighting(), AddDirectionalLight(), AddAmbientLight(), RemoveAllLights(), SetGradientBackground(), SetSolidBackground(), ShowGrid(), SetGridSpacing(), SetGridColor(), GetType(), IsValid(), GetName(), SetRenderingMode(), GetRenderingMode(), SetAntiAliasing(), SetShadows(), GetContext(), LViewer(), ~LViewer(), LViewer(), operator=()
Enums: ViewerType, RenderingMode
Fields
myType
ViewerType myType;myRenderingMode
RenderingMode myRenderingMode;myName
std::string myName;Methods
Factory Methods
CreateDesktopViewer
static LViewer CreateDesktopViewer(const std::string & name);Instance Methods
CreateView
LView CreateView(const std::string & name, int x, int y, int width, int height) const;RemoveView
void RemoveView(const & LView view) const;UpdateAllViews
void UpdateAllViews() const;SetDefaultLighting
void SetDefaultLighting() const;AddDirectionalLight
void AddDirectionalLight(const & Vector direction, const & Color color) const;AddAmbientLight
void AddAmbientLight(const & Color color, double intensity) const;RemoveAllLights
void RemoveAllLights() const;SetGradientBackground
void SetGradientBackground(const & Color topColor, const & Color bottomColor) const;SetSolidBackground
void SetSolidBackground(const & Color color) const;ShowGrid
void ShowGrid(bool show) const;SetGridSpacing
void SetGridSpacing(double spacing) const;SetGridColor
void SetGridColor(const & Color color) const;GetType
ViewerType GetType() const;IsValid
bool IsValid() const;GetName
std::string GetName() const;SetRenderingMode
void SetRenderingMode(RenderingMode mode) const;GetRenderingMode
RenderingMode GetRenderingMode() const;SetAntiAliasing
void SetAntiAliasing(bool enable) const;SetShadows
void SetShadows(bool enable) const;GetContext
LContext GetContext() const;LViewer
LViewer() const;~LViewer
~LViewer() const;LViewer
LViewer(const & LViewer other) const;operator=
& LViewer operator=(const & LViewer other) const;Enumerations
ViewerType
enum ViewerType {
VIEWER_DESKTOP
VIEWER_WEBGL
};RenderingMode
enum RenderingMode {
RENDERING_WIREFRAME
RENDERING_SHADED
RENDERING_SHADED_WITH_EDGES
};