Difference between revisions of "User:Le Forgeron/UVMeshable"
Jump to navigation
Jump to search
Le Forgeron (talk | contribs) (Created page with "{{User:Le_Forgeron/HgPovray38/soon}} == UVMeshable == === A bit of programming === UVMeshable objects are shapes that provides the UVMeshable interface: <source lang="c"> c...") |
Le Forgeron (talk | contribs) |
||
Line 20: | Line 20: | ||
So far the following shapes are uvmeshable: | So far the following shapes are uvmeshable: | ||
* <code>nurbs</code> (see [[User:Le_Forgeron/nurbs]]) | * <code>nurbs</code> (see [[User:Le_Forgeron/nurbs]]) | ||
− | * <code>rational_bezier_patch</code> (see [[User:Le_Forgeron/rational_bezier_patch]] | + | * <code>rational_bezier_patch</code> (see [[User:Le_Forgeron/rational_bezier_patch]]) |
* <code>sphere</code> as a proof of concept | * <code>sphere</code> as a proof of concept | ||
Revision as of 08:22, 4 July 2018
- Everything about HgPovray38 in User:Le_Forgeron/HgPovray38
- Not yet available
UVMeshable
A bit of programming
UVMeshable objects are shapes that provides the UVMeshable interface:
class UVMeshable
{
public:
virtual void evalVertex( VECTOR r, const DBL u, const DBL v )const;
virtual void evalNormal( VECTOR r, const DBL u, const DBL v )const;
virtual void minUV( UV_VECT r )const;
virtual void maxUV( UV_VECT r )const;
};
Which shapes are uvmeshable
So far the following shapes are uvmeshable:
nurbs
(see User:Le_Forgeron/nurbs)rational_bezier_patch
(see User:Le_Forgeron/rational_bezier_patch)sphere
as a proof of concept
Access to data of UVMeshable objects
- Returns the minimal uv-coordinates uv_min( UVMeshableObject )
- Returns the maximal uv-coordinates uv_max( UVMeshableObject )
- Returns the vertex vector that corresponds to the given uv-coordinates uv_vertex( UVMeshableObject, Ucoordinate, Vcoordinate )
- Returns the normal vector that corresponds to the given uv-coordinates uv_normal( UVMeshableObject, Ucoordinate, Vcoordinate )