HNurbsSurface Class Reference

The HNurbsSurface class encapsulates a NURBS surface or Chaking subdivision surface. More...

#include <HOpCreateNurbs3D.h>

Public Member Functions

void CreateDefaultVertices (HPoint *center, HPoint *axis)
void DisableSelectability ()
void DisplayVertices ()
void EnableSelectability ()
HC_KEY GetKey ()
HC_KEY GetSurfaceMeshKey ()
void HideVertices ()
 HNurbsSurface ()
void Init (HC_KEY key)
HC_KEY Init (HPoint *center, HPoint *axis, int num_u_vertices, int num_v_vertices, int degree, int tesselation_level, float distance, HSurfaceType stype)
void Recalculate ()
void ShowVertex (int vertexnum, HPoint &v)
void UpdateVertex (int vertexnum, float x, float y, float z)

Detailed Description

The HNurbsSurface class encapsulates a NURBS surface or Chaking subdivision surface.

The surface can either be created by passing the necessary parameters like degree, control points, tessellation level or implicitly from an existing nurbs segment in the hoops segment tree. It is internally represented as a HOOPS mesh as described in #HC_Insert_NURBS_Surface and a second invisible mesh representing the control points themselves.

Constructor & Destructor Documentation

◆ HNurbsSurface()

HNurbsSurface::HNurbsSurface ( )

Constructs a HNurbsSurface.

Member Function Documentation

◆ CreateDefaultVertices()

void HNurbsSurface::CreateDefaultVertices ( HPoint center,
HPoint axis 

This method creates a set of default control points given a center point and an axis of rotation.

centerThe center point for creation.
axisAn initial axis of rotation.

◆ DisableSelectability()

void HNurbsSurface::DisableSelectability ( )

This method disables the selectability of NURBS Surface.

◆ DisplayVertices()

void HNurbsSurface::DisplayVertices ( )

This method shows the mesh containing the control points for the surface.

◆ EnableSelectability()

void HNurbsSurface::EnableSelectability ( )

This method enables the selectability of the NURBS surface.

◆ GetKey()

HC_KEY HNurbsSurface::GetKey ( )
The NURBS surface key.

◆ GetSurfaceMeshKey()

HC_KEY HNurbsSurface::GetSurfaceMeshKey ( )
The key to the tesselated mesh.

◆ HideVertices()

void HNurbsSurface::HideVertices ( )

This method hides the control point mesh.

◆ Init() [1/2]

void HNurbsSurface::Init ( HC_KEY  key)

This method initializes the Nurbs object based on existing nurbs segment in HOOPS.

keyThe key to the nurbs segment in HOOPS.

◆ Init() [2/2]

HC_KEY HNurbsSurface::Init ( HPoint center,
HPoint axis,
int  num_u_vertices,
int  num_v_vertices,
int  degree,
int  tesselation_level,
float  distance,
HSurfaceType  stype 

This method initialize the Nurbs object based on given parameters.

centerThe location of the center of creation.
axisThe initial axis of rotation.
num_u_verticesThe number of control points in the u direction.
num_v_verticesThe number of control points in the v direction.
degreeThe degree of the surface.
tesselation_levelThe tesselation density.
distanceThe distance of vertices. This parameter is used during tesselation.
stypePass which type of surface you want to create. It can either be either NURBS or Chakin.

◆ Recalculate()

void HNurbsSurface::Recalculate ( )

This method recalculates the surface based on the existing control points.

◆ ShowVertex()

void HNurbsSurface::ShowVertex ( int  vertexnum,
HPoint v 

This method returns the location of a control point given a specific index identifier.

vertexnumThe control point index number in the m_pVertices list.
vReference to HPoint structure. This method returns the control poĆ­nt position.

◆ UpdateVertex()

void HNurbsSurface::UpdateVertex ( int  vertexnum,
float  x,
float  y,
float  z 

This method allows you to modify a specific control point.

vertexnumThe control point index number in the m_pVertices list.
xThe new x coordinate.
yThe new y coordinate.
zThe new z coordinate.

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