ofDocsdocumentation 3d of3dGraphics

of3dGraphics


drawArrow( ... )

void drawArrow(const glm::vec3 &start, const glm::vec3 &end, float headSize)

drawAxis( ... )

void drawAxis(float size)

drawBox( ... )

void drawBox(const glm::vec3 &position, float size)

Draws a cube with the specified size, starting from the specified position.

A cube is drawn starting from a 3D reference position, with the specified size. The cube is drawn with the current color, e.g. set with ofSetColor(). The cube is drawn filled by default; change this with ofFill();

Parameters:

position an glm::vec3 which contains the (x,y,z) coordinates for the cube's reference corner.

size The size of the cube.


drawBox( ... )

void drawBox(const glm::vec3 &position, float width, float height, float depth)

Draws a rectangular box with the specified dimensions, starting from the specified position.

A box is a rectangular solid: an extruded rectangle. It is drawn starting from a 3D reference coordinate. It has a width (in x), a height (in y), and a depth (in z). The box is drawn with the current color, e.g. set with ofSetColor(). The box is drawn filled by default; change this with ofFill();

Parameters:

position an glm::vec3 which contains the (x,y,z) coordinates for the box's reference corner.

width The width of the box.

height The height of the box.

depth The depth of the box.


drawBox( ... )

void drawBox(float size)

Draws a cube with the specified size, starting from the origin.

The cube is drawn with the current color, e.g. set with ofSetColor(). The cube is drawn filled by default; change this with ofFill();

Parameters:

size The size of the cube.


drawBox( ... )

void drawBox(float width, float height, float depth)

Draws a rectangular box with the specified dimensions, starting from the origin.

A box is a rectangular solid: an extruded rectangle. It is drawn starting from the origin of the current reference frame. It has a width (in x), a height (in y), and a depth (in z). The box is drawn with the current color, e.g. set with ofSetColor(). The box is drawn filled by default; change this with ofFill();

Parameters:

width The width of the box.

height The height of the box.

depth The depth of the box.


drawBox( ... )

void drawBox(float x, float y, float z, float size)

Draws a cube with the specified size, starting from the specified coordinates.

A cube is a rectangular solid bounded by six square faces of equal size. It is also known as a regular hexahedron, a square parallelepiped, an equilateral cuboid and a right rhombohedron. It is a regular square prism in three orientations.

It is drawn starting from a 3D reference coordinate, with the specified size. The cube is drawn with the current color, e.g. set with ofSetColor(). The cube is drawn filled by default; change this with ofFill();

Parameters:

x The x-coordinate of the cube's origin.

y The y-coordinate of the cube's origin.

z The z-coordinate of the cube's origin.

size The size of the cube.


drawBox( ... )

void drawBox(float x, float y, float z, float width, float height, float depth)

Draws a rectangular box with the specified dimensions, starting from the specified coordinates.

A box is a rectangular solid: an extruded rectangle. It is drawn starting from a 3D reference coordinate. It has a width (in x), a height (in y), and a depth (in z). The box is drawn with the current color, e.g. set with ofSetColor(). The box is drawn filled by default; change this with ofFill();

Parameters:

x The x-coordinate of the box's origin.

y The y-coordinate of the box's origin.

z The z-coordinate of the box's origin.

width The width of the box.

height The height of the box.

depth The depth of the box.


drawCone( ... )

void drawCone(const glm::vec3 &position, float radius, float height)

drawCone( ... )

void drawCone(float radius, float height)

drawCone( ... )

void drawCone(float x, float y, float radius, float height)

drawCone( ... )

void drawCone(float x, float y, float z, float radius, float height)

drawCylinder( ... )

void drawCylinder(const glm::vec3 &position, float radius, float height)

drawCylinder( ... )

void drawCylinder(float radius, float height)

drawCylinder( ... )

void drawCylinder(float x, float y, float radius, float height)

drawCylinder( ... )

void drawCylinder(float x, float y, float z, float radius, float height)

drawGrid( ... )

void drawGrid(float stepSize, size_t numberOfSteps, bool labels, bool x, bool y, bool z)

drawGridPlane( ... )

void drawGridPlane(float stepSize, size_t numberOfSteps, bool labels)

drawIcoSphere( ... )

void drawIcoSphere(const glm::vec3 &position, float radius)

drawIcoSphere( ... )

void drawIcoSphere(float radius)

drawIcoSphere( ... )

void drawIcoSphere(float x, float y, float radius)

drawIcoSphere( ... )

void drawIcoSphere(float x, float y, float z, float radius)

drawPlane( ... )

void drawPlane(glm::vec3 &position, float width, float height)

drawPlane( ... )

void drawPlane(float width, float height)

drawPlane( ... )

void drawPlane(float x, float y, float width, float height)

drawPlane( ... )

void drawPlane(float x, float y, float z, float width, float height)

drawRotationAxes( ... )

void drawRotationAxes(float radius, float stripWidth, int circleRes)

drawSphere( ... )

void drawSphere(const glm::vec3 &position, float radius)

drawSphere( ... )

void drawSphere(float radius)

drawSphere( ... )

void drawSphere(float x, float y, float radius)

drawSphere( ... )

void drawSphere(float x, float y, float z, float radius)

getBoxResolution( )

glm::vec3 getBoxResolution()

getConeResolution( )

glm::vec3 getConeResolution()

Retrieve a data structure describing the resolution with which cones are polygonized.

Allows you to fetch the resolution with which cones are polygonized. Returns an ofVec3f containing the following data: Encoded as "x": radiusSegments, the number of facets (subdivisions) around the cone's circular footprint. Encoded as "y": heightSegments, the number of subdivisions from the cone's top to bottom. Encoded as "z": capSegments, the number of annular (ring-shaped) subdivisions of the cone's endcap.

Returns: An ofVec3f containing (radiusSegments, heightSegments, capSegments) for cone polygonization.


getCylinderResolution( )

glm::vec3 getCylinderResolution()

getIcoSphereResolution( )

int getIcoSphereResolution()

getPlaneResolution( )

glm::vec2 getPlaneResolution()

getSphereResolution( )

int getSphereResolution()

of3dGraphics( ... )

of3dGraphics(ofBaseRenderer *renderer)

renderCached3dPrimitive( ... )

void renderCached3dPrimitive(const of3dPrimitive &model)

setBoxResolution( ... )

void setBoxResolution(int res)

setBoxResolution( ... )

void setBoxResolution(int resWidth, int resHeight, int resDepth)

setConeResolution( ... )

void setConeResolution(int radiusSegments, int heightSegments, int capSegments=2)

Set the resolution of a polygonized cone.

Allows you to set the polygonization resolution of any cones you subsequently draw with ofDrawCone().

Parameters:

radiusSegments The number of facets (subdivisions) around the cone's circular footprint.

heightSegments The number of subdivisions from the cone's top to bottom.

capSegments The number of annular (ring-shaped) subdivisions of the cone's endcap.


setCylinderResolution( ... )

void setCylinderResolution(int radiusSegments, int heightSegments, int capSegments=2)

setIcoSphereResolution( ... )

void setIcoSphereResolution(int res)

setPlaneResolution( ... )

void setPlaneResolution(int columns, int rows)

setSphereResolution( ... )

void setSphereResolution(int res)