Momentum Scripting v1
Loading...
Searching...
No Matches
SceneGraph.h
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material without having a written signed agreement with Algoryx Simulation AB.
9
10Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
11from using this software, unless otherwise stated in written agreements with
12Algoryx Simulation AB.
13*/
14#ifndef MOMENTUM_SCENEGRAPH_H
15#define MOMENTUM_SCENEGRAPH_H
16
17#include "momentum_namespace.h"
18#include "momentum_export.h"
19#include "macros.h"
20
21#include "Vec3.h"
22#include "Vec4.h"
23#include "SceneNode.h"
24
25#include <string>
26#include <vector>
27
28namespace agxSDK
29{
30 class Simulation;
31}
32
33namespace MOMENTUM_NAMESPACE
34{
45 class MOMENTUM_EXPORT SceneGraph
46 {
47 public:
49#ifndef SWIG
50 SceneGraph(agxSDK::Simulation* simulation);
51
55 SceneGraph();
56#endif
58 virtual ~SceneGraph();
59
61
69 static SceneNodePtr createAndAddLine(const Vec3& p1, const Vec3& p2, const Vec4& color, float width);
70
78 static SceneNodePtr createAndAddPolyline(std::vector<Vec3> points, const Vec4& color, float width);
79
97 static SceneNodePtr createAndAdd3DGrid(int resU, int resV, int resW, const Vec3& origin, const Vec3& endPointX, const Vec3& endPointY, const Vec3& endPointZ, const Vec4& color, float width);
98
107 static SceneNodePtr createAndAddText(const std::string& text, const Vec3& relPosition, const Vec4& color, float size);
108
113 static bool removeNode(SceneNodePtr node);
114 };
115
116 V1_DECLARE_CONTAINER_TYPE(SceneGraph);
117
118} // namespace momentum
119
120
121#endif
The SceneGraph class provides an interface for managing and rendering graphical objects within a scen...
Definition: SceneGraph.h:46
static SceneNodePtr createAndAddPolyline(std::vector< Vec3 > points, const Vec4 &color, float width)
Create and return a new Polyine to render.
static bool removeNode(SceneNodePtr node)
Remove the given scene node from the scene graph.
static SceneNodePtr createAndAdd3DGrid(int resU, int resV, int resW, const Vec3 &origin, const Vec3 &endPointX, const Vec3 &endPointY, const Vec3 &endPointZ, const Vec4 &color, float width)
Create a uniform grid and adds it to the scene graph.
static SceneNodePtr createAndAddText(const std::string &text, const Vec3 &relPosition, const Vec4 &color, float size)
Create a text object and adds it to the scene graph.
static SceneNodePtr createAndAddLine(const Vec3 &p1, const Vec3 &p2, const Vec4 &color, float width)
Create and add a line to the scene graph.
A 3 dimensional vector which can be used to define a point or a vector and contains basic arithmetic.
Definition: Vec3.h:40
A 4 dimensional vector and contains basic arithmetic.
Definition: Vec4.h:33
Namespace for Momentum Scripting API.
Definition: AffineMatrix4x4.h:29
std::shared_ptr< SceneNode > SceneNodePtr
Definition: SceneNode.h:59
Definition: SceneGraph.h:29