ug4
|
platonic solid with eight faces. More...
#include <grid_objects_3d.h>
Public Types | |
typedef Volume | BaseClass |
Public Types inherited from ug::Volume | |
typedef Volume | grid_base_object |
typedef void | higher_dim_base_object |
typedef Face | lower_dim_base_object |
typedef Face | side |
typedef Volume | sideof |
Public Types inherited from ug::IVertexGroup | |
typedef Vertex *const * | ConstVertexArray |
Public Member Functions | |
virtual bool | collapse_edge (std::vector< Volume * > &vNewVolumesOut, int edgeIndex, Vertex *newVertex, std::vector< Vertex * > *pvSubstituteVertices=NULL) |
virtual int | container_section () const |
virtual Edge * | create_edge (int index) |
create the edge with index i and return it. More... | |
virtual GridObject * | create_empty_instance () const |
create an instance of the derived type More... | |
virtual Face * | create_face (int index) |
create the face with index i and return it. More... | |
virtual EdgeDescriptor | edge_desc (int index) const |
virtual void | edge_desc (int index, EdgeDescriptor &edOut) const |
virtual FaceDescriptor | face_desc (int index) const |
virtual void | face_desc (int index, FaceDescriptor &fdOut) const |
virtual int | get_edge_index_from_vertices (const size_t vi0, const size_t vi1) const |
returns the local index of the edge which connects the two vertex indices. More... | |
virtual int | get_face_edge_index (const size_t faceInd, const size_t faceEdgeInd) const |
returns the local index of the j-th edge of the i-th face of the volume More... | |
virtual void | get_flipped_orientation (VolumeDescriptor &vdOut) const |
virtual std::pair< GridBaseObjectId, int > | get_opposing_object (Vertex *vrt) const |
returns an index to the obbject, which lies on the opposite side of the volume to the given vertex. More... | |
virtual void | get_vertex_indices_of_edge (size_t &ind1Out, size_t &ind2Out, size_t edgeInd) const |
returns the local indices of an edge of the volume. More... | |
virtual void | get_vertex_indices_of_face (std::vector< size_t > &indsOut, size_t side) const |
returns the local indices of a face of the volume. More... | |
virtual bool | is_regular_ref_rule (int edgeMarks) const |
returns true if the specified edgeMarks would lead to a regular refinement More... | |
virtual uint | num_edges () const |
virtual uint | num_faces () const |
virtual size_t | num_vertices () const |
Octahedron () | |
Octahedron (const OctahedronDescriptor &td) | |
Octahedron (Vertex *v1, Vertex *v2, Vertex *v3, Vertex *v4, Vertex *v5, Vertex *v6) | |
virtual ReferenceObjectID | reference_object_id () const |
virtual bool | refine (std::vector< Volume * > &vNewVolumesOut, Vertex **ppNewVertexOut, Vertex **newEdgeVertices, Vertex **newFaceVertices, Vertex *newVolumeVertex, const Vertex &prototypeVertex, Vertex **pSubstituteVertices=NULL, vector3 *corners=NULL, bool *isSnapPoint=NULL) |
Creates new volume elements through refinement. More... | |
virtual Vertex * | vertex (size_t index) const |
virtual ConstVertexArray | vertices () const |
Public Member Functions inherited from ug::Volume | |
virtual int | base_object_id () const |
int | get_local_side_index (FaceVertices *f) const |
returns the local index of the given face or -1, if the face is not part of the volume. More... | |
virtual bool | get_opposing_side (FaceVertices *f, FaceDescriptor &fdOut) const |
retrieves the face-descriptor for the opposing side to the specified one. More... | |
uint | num_sides () const |
virtual | ~Volume () |
Public Member Functions inherited from ug::GridObject | |
uint | grid_data_index () const |
Returns the grid attachment data index of a geometric object. More... | |
virtual bool | is_constrained () const |
returns true if the object is constrained by other objects. More... | |
virtual bool | is_constraining () const |
returns the id of the reference-object. More... | |
virtual | ~GridObject () |
virtual void | remove_constraint_link (const Vertex *vrt) |
removes a constraint link to the grid object. More... | |
virtual void | remove_constraint_link (const Edge *e) |
removes a constraint link to the grid object. More... | |
virtual void | remove_constraint_link (const Face *f) |
removes a constraint link to the grid object. More... | |
Public Member Functions inherited from ug::VolumeVertices | |
Vertex * | operator[] (size_t index) const |
returns the i-th vertex. More... | |
size_t | size () const |
returns the number of vertices. More... | |
virtual | ~VolumeVertices () |
Public Member Functions inherited from ug::IVertexGroup | |
Vertex * | operator[] (size_t index) const |
returns the i-th vertex. More... | |
size_t | size () const |
returns the number of vertices. More... | |
virtual | ~IVertexGroup () |
Static Public Member Functions | |
static bool | type_match (GridObject *pObj) |
Static Public Member Functions inherited from ug::Volume | |
static bool | type_match (GridObject *pObj) |
Static Public Attributes | |
static const size_t | NUM_VERTICES = 6 |
Static Public Attributes inherited from ug::Volume | |
static const int | BASE_OBJECT_ID = VOLUME |
static const bool | CAN_BE_SIDE = false |
static const int | dim = 3 |
reference dimension More... | |
static const bool | HAS_SIDES = true |
Protected Member Functions | |
virtual void | set_vertex (uint index, Vertex *pVrt) |
Protected Member Functions inherited from ug::GridObject | |
void | set_grid_data_index (uint index) |
ATTENTION: Use this method with extreme care! More... | |
Protected Attributes | |
Vertex * | m_vertices [6] |
Protected Attributes inherited from ug::GridObject | |
uint | m_gridDataIndex |
platonic solid with eight faces.
order of vertices should be the same as described in
typedef Volume ug::Octahedron::BaseClass |
|
inline |
ug::Octahedron::Octahedron | ( | const OctahedronDescriptor & | td | ) |
References ug::OctahedronDescriptor::vertex().
ug::Octahedron::Octahedron | ( | Vertex * | v1, |
Vertex * | v2, | ||
Vertex * | v3, | ||
Vertex * | v4, | ||
Vertex * | v5, | ||
Vertex * | v6 | ||
) |
|
virtual |
The collapse_edge method creates new geometric objects by collapsing the specified edge. The user that calls this function is responsible to either register the new volumes with a grid (the grid from which the vertices are), or to take responsibility for deletion of the acquired memory (delete each element in vNewFacesOut).
Reimplemented from ug::Volume.
References UG_LOG.
|
inlinevirtual |
Reimplemented from ug::Volume.
References ug::CSVOL_OCTAHEDRON.
|
virtual |
create the edge with index i and return it.
Reimplemented from ug::Volume.
References ug::hex_rules::EDGE_VRT_INDS, and ug::hex_rules::NUM_EDGES.
|
inlinevirtual |
create an instance of the derived type
Make sure to overload this method in derivates of this class!
Reimplemented from ug::GridObject.
|
virtual |
create the face with index i and return it.
Reimplemented from ug::Volume.
References ug::hex_rules::FACE_VRT_INDS, and ug::hex_rules::NUM_FACES.
|
virtual |
Reimplemented from ug::Volume.
|
virtual |
Reimplemented from ug::Volume.
References ug::hex_rules::EDGE_VRT_INDS, ug::hex_rules::NUM_EDGES, and ug::EdgeDescriptor::set_vertices().
|
virtual |
Reimplemented from ug::Volume.
|
virtual |
Reimplemented from ug::Volume.
References ug::hex_rules::FACE_VRT_INDS, ug::hex_rules::NUM_FACES, ug::FaceDescriptor::set_num_vertices(), and ug::FaceDescriptor::set_vertex().
|
virtual |
returns the local index of the edge which connects the two vertex indices.
Default implementation throws a UGError
Reimplemented from ug::Volume.
References ug::hex_rules::EDGE_FROM_VRTS.
|
virtual |
returns the local index of the j-th edge of the i-th face of the volume
Default implementation throws a UGError
Reimplemented from ug::Volume.
References ug::hex_rules::FACE_EDGE_INDS.
|
virtual |
Writes vertices to the volume-descriptor so that it defines a volume with flipped orientation. If you want to flip the orientation of a volume in a grid, please consider using the grids flip_orientation method.
Please note: The default implementation returns the original volume and has to be reimplemented by derived classes.
Reimplemented from ug::Volume.
References ug::VolumeDescriptor::set_num_vertices(), and ug::VolumeDescriptor::set_vertex().
|
virtual |
returns an index to the obbject, which lies on the opposite side of the volume to the given vertex.
The method returs a pair <GridBaseObjectId, int>, where GridBaseObjectId is either VERTEX, EDGE, or FACE and where the second entry specifies the local index of the object in the given volume.
Reimplemented from ug::Volume.
References ug::hex_rules::NUM_VERTICES, ug::hex_rules::OPPOSED_OBJECT, and UG_THROW.
|
virtual |
returns the local indices of an edge of the volume.
Default implementation throws a UGError
Reimplemented from ug::Volume.
References ug::hex_rules::EDGE_VRT_INDS, and ug::hex_rules::NUM_EDGES.
|
virtual |
returns the local indices of a face of the volume.
Default implementation throws a UGError
Reimplemented from ug::Volume.
References ug::hex_rules::FACE_VRT_INDS, and ug::hex_rules::NUM_FACES.
|
virtual |
returns true if the specified edgeMarks would lead to a regular refinement
A regular refinement leads to new elements which are all similar to the original element. I.e. which are of the same type and which have similar angles.
edgeMarks | If the i-th edge shall be refined, the expression 'edgeMarks & (1<<i) != 0' has to be true. You can specify multiple refine-edges using or-combinations: 'edgeMarks = (1<<i) | (1<<j)' would indicate that the i-th and the j-th edge shall be refined. |
Reimplemented from ug::Volume.
References ug::hex_rules::IsRegularRefRule().
|
virtual |
Reimplemented from ug::Volume.
|
virtual |
Reimplemented from ug::Volume.
|
inlinevirtual |
Reimplemented from ug::VolumeVertices.
|
inlinevirtual |
A reference object represents a class of geometric objects. Tetrahedrons, Triangles etc are such classes. Reference ids should be defined in the file in which concrete geometric objects are defined.
Reimplemented from ug::Volume.
References ug::ROID_OCTAHEDRON.
|
virtual |
Creates new volume elements through refinement.
Make sure that newEdgeVertices contains 6 vertex pointers. newFaceVertices is ignored for Octahedrons.
Reimplemented from ug::Volume.
References ug::Refine().
creates the volumes that result from the splitting of the edge with index 'splitEdgeIndex'. creates the volumes that result from the collapsing of the edge with index 'splitEdgeIndex'.
Reimplemented from ug::Volume.
|
inlinestatic |
|
inlinevirtual |
Reimplemented from ug::VolumeVertices.
Referenced by ug::CalculateVolume(), and ug::SplitOctahedronToTetrahedrons().
|
inlinevirtual |
Reimplemented from ug::VolumeVertices.
|
protected |
|
static |