This is another convenience class an hexahedron. Most methods, however, only work if the faces of the hexa are planar
The point numbering convention and orientation is given in the figure below:
Methods
The connectivity of the hexa is defined so that triangle normals always point outside the volume. This is important for ray tracing.
Offsets each point of the volume by a multiplicative “factor” in the direction of the centerpoint.
The procedure is shown in the figure below:
The original vector (\(V_o\)) and the resulting vector (\(V_r\)) are related by the factor \(f\) as:
\(V_r = V_o \cdot f\)
Parameters : | factor : float
|
---|
This is a convienience function to interpolate the data in the ”.data” field of this object. As the field is not under surveillance, it is the responsibility of the user to ensure that the field contains a numpy.ndarray with the shape \((M,8)\), i.e. one data point for each vertex
Parameters : | p : numpy.ndarray \((N,3)\)
verify : boolean (True)
|
---|---|
Returns : | result : numpy.ndarray \((N,M)\)
|
Transforms a vector or a list of vectors in parametric coordinates with the following properties:
\(\left( x,y,z \right) \mapsto \left(u,v,w \right)\)
Where \(x,y,z\) are world coordinates and \(u,v,w\) are parametric coordinates defined so that:
\(0 \leq u,v,w \leq 1\)
represents a point inside the volume.
Transforms a vector or a list of vectors in parametric coordinates with the following properties:
\(\left( x,y,z \right) \mapsto \left(u,v,w \right)\)
Where \(x,y,z\) are world coordinates and \(u,v,w\) are parametric coordinates defined so that:
\(0 \leq u,v,w \leq 1\)
represents a point inside the volume.
This is intended as a lightweigth test for checking if a point (or a set of them) lies inside an hexahedron. This uses the algorithm implemented in Utils.
Parameters : | p : numpy.ndarray \((N,3)\)
|
---|---|
Returns : | result : numpy.ndarray \((N)\)
|