|
Gin
|
A 3D object that contains a collection of points and line segments with a transform. More...
#include <gin_scene3d.h>
Public Member Functions | |
| Object3D ()=default | |
| void | clear () |
| Clears all points and line segments. | |
| void | addPoint (const Point3D &point) |
| Adds a point. | |
| void | addPoint (const Vec3f &position, float size=1.0f, juce::Colour colour=juce::Colours::white) |
| void | addLine (const LineSegment3D &line) |
| Adds a line segment. | |
| void | addLine (const Vec3f &start, const Vec3f &end, juce::Colour colour=juce::Colours::white) |
| void | addTriangle (const Vec3f &a, const Vec3f &b, const Vec3f &c, juce::Colour colour=juce::Colours::white) |
| Adds multiple lines forming a triangle (wireframe). | |
| void | addBox (const Vec3f &min, const Vec3f &max, juce::Colour colour=juce::Colours::white) |
| Adds multiple lines forming a box (wireframe). | |
| void | addGrid (float size, int divisions, juce::Colour colour=juce::Colours::grey) |
| Adds lines forming a grid on the XZ plane. | |
| void | addAxes (float length, float thickness=1.0f) |
| Adds coordinate axis lines. | |
| void | setTransform (const Mat4f &t) |
| Sets the object's transform matrix. | |
| const Mat4f & | getTransform () const |
| Gets the object's transform matrix. | |
| void | setPosition (const Vec3f &pos) |
| Sets the object's position. | |
| Vec3f | getPosition () const |
| Gets the object's position. | |
| const std::vector< Point3D > & | getPoints () const |
| Gets all points. | |
| size_t | getNumPoints () const |
| Gets the number of points. | |
| const std::vector< LineSegment3D > & | getLines () const |
| Gets all line segments. | |
| size_t | getNumLines () const |
| Gets the number of line segments. | |
| void | setColour (juce::Colour c) |
| Sets the default colour for new lines. | |
| void | setVisible (bool v) |
| Visibility. | |
| bool | isVisible () const |
A 3D object that contains a collection of points and line segments with a transform.
|
default |
| void Object3D::clear | ( | ) |
Clears all points and line segments.
| void Object3D::addPoint | ( | const Vec3f & | position, |
| float | size = 1.0f, |
||
| juce::Colour | colour = juce::Colours::white |
||
| ) |
| void Object3D::addLine | ( | const LineSegment3D & | line | ) |
Adds a line segment.
Referenced by addAxes(), addBox(), addGrid(), and addTriangle().
| void Object3D::addLine | ( | const Vec3f & | start, |
| const Vec3f & | end, | ||
| juce::Colour | colour = juce::Colours::white |
||
| ) |
| void Object3D::addTriangle | ( | const Vec3f & | a, |
| const Vec3f & | b, | ||
| const Vec3f & | c, | ||
| juce::Colour | colour = juce::Colours::white |
||
| ) |
Adds multiple lines forming a triangle (wireframe).
References addLine().
| void Object3D::addBox | ( | const Vec3f & | min, |
| const Vec3f & | max, | ||
| juce::Colour | colour = juce::Colours::white |
||
| ) |
Adds multiple lines forming a box (wireframe).
References addLine(), Point< T >::x, and Point< T >::y.
Adds lines forming a grid on the XZ plane.
References addLine().
Adds coordinate axis lines.
References addLine().
Sets the object's position.
References Mat4< T >::m, Vec3< T >::x, Vec3< T >::y, and Vec3< T >::z.
| Vec3f Object3D::getPosition | ( | ) | const |
Gets the object's position.
References Mat4< T >::m.
| size_t Object3D::getNumPoints | ( | ) | const |
Gets the number of points.
| const std::vector< LineSegment3D > & Object3D::getLines | ( | ) | const |
Gets all line segments.
| size_t Object3D::getNumLines | ( | ) | const |
Gets the number of line segments.
| void Object3D::setColour | ( | juce::Colour | c | ) |
Sets the default colour for new lines.
| bool Object3D::isVisible | ( | ) | const |