AvogadroLibs 1.98.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ArcSector Class Reference

The ArcSector class is a convenience class for creating an arc disk (e.g., part of a circle) from a MeshGeometry. More...

#include <arcsector.h>

Inheritance diagram for ArcSector:
MeshGeometry Drawable

Public Member Functions

void setArcSector (const Vector3f &origin, const Vector3f &startEdge, const Vector3f &normal, float degreesCCW, float resolutionDeg)
 
- Public Member Functions inherited from MeshGeometry
 MeshGeometry (const MeshGeometry &other)
 
MeshGeometryoperator= (MeshGeometry)
 
void accept (Visitor &) override
 
void render (const Camera &camera) override
 Render the mesh geometry.
 
void clear () override
 
size_t vertexCount () const
 
size_t indexCount () const
 
size_t triangleCount () const
 
Core::Array< PackedVertexvertices ()
 
Core::Array< unsigned int > triangles ()
 
unsigned int addVertices (const Core::Array< Vector3f > &vertices, const Core::Array< Vector3f > &normals, const Core::Array< Vector4ub > &colors)
 
unsigned int addVertices (const Core::Array< Vector3f > &vertices, const Core::Array< Vector3f > &normals, const Core::Array< Vector3ub > &colors)
 
unsigned int addVertices (const Core::Array< Vector3f > &vertices, const Core::Array< Vector3f > &normals)
 
void addTriangle (unsigned int index1, unsigned int index2, unsigned int index3)
 
void addTriangles (const Core::Array< unsigned int > &indices)
 
void setColor (const Vector3ub &c)
 
Vector3ub color () const
 
void setOpacity (unsigned char opacity_)
 
unsigned char opacity () const
 
- Public Member Functions inherited from Drawable
 Drawable (const Drawable &other)
 
Drawableoperator= (Drawable)
 
const GeometryNodeparent () const
 Get a pointer to the drawable object's parent.
 
GeometryNodeparent ()
 
void setVisible (bool visibility)
 Set the visibility of the drawable object.
 
bool isVisible () const
 Get the current visibility of the drawable.
 
Identifieridentifier ()
 
const Identifieridentifier () const
 
virtual std::multimap< float, Identifierhits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const
 
virtual Core::Array< IdentifierareaHits (const Frustrum &f) const
 
void setRenderPass (RenderPass pass)
 
RenderPass renderPass () const
 

Additional Inherited Members

- Static Public Attributes inherited from MeshGeometry
static const unsigned int InvalidIndex
 
- Protected Member Functions inherited from Drawable
void setParent (GeometryNode *parent)
 Set the parent node for the node.
 
- Protected Attributes inherited from Drawable
GeometryNodem_parent
 
bool m_visible
 
RenderPass m_renderPass
 
Identifier m_identifier
 

Detailed Description

<avogadro/rendering/arcsector.h>

See also
ArcStrip for the edge of a circle.

Member Function Documentation

◆ setArcSector()

void setArcSector ( const Vector3f &  origin,
const Vector3f &  startEdge,
const Vector3f &  normal,
float  degreesCCW,
float  resolutionDeg 
)

Define the sector.

Parameters
originCenter of the circle from which the arc is cut.
startEdgeA vector defining an leading edge of the sector. The direction is used to fix the sector's rotation about the origin, and the length defines the radius of the sector.
normalThe normal direction to the plane of the sector.
degreesCCWThe extent of the sector, measured counter-clockwise from startEdge in degrees.
resolutionDegThe radial width of each triangle used in the sector approximation in degrees. This will be adjusted to fit an integral number of triangles in the sector. Smaller triangles (better approximations) are chosen if adjustment is needed.

The documentation for this class was generated from the following file: