Blender V4.3
DNA_curves_types.h File Reference
#include "DNA_ID.h"
#include "DNA_customdata_types.h"
#include "DNA_object_types.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Classes

struct  CurvesGeometry
 
struct  Curves
 

Macros

#define CURVE_TYPES_NUM   4
 
#define CURVES_MATERIAL_NR   1
 

Typedefs

typedef struct CurvesGeometryRuntimeHandle CurvesGeometryRuntimeHandle
 
typedef enum CurveType CurveType
 
typedef enum HandleType HandleType
 
typedef enum KnotsMode KnotsMode
 
typedef enum NormalMode NormalMode
 
typedef struct CurvesGeometry CurvesGeometry
 
typedef struct Curves Curves
 
typedef enum eCurvesSymmetryType eCurvesSymmetryType
 

Enumerations

enum  CurveType { CURVE_TYPE_CATMULL_ROM = 0 , CURVE_TYPE_POLY = 1 , CURVE_TYPE_BEZIER = 2 , CURVE_TYPE_NURBS = 3 }
 
enum  HandleType { BEZIER_HANDLE_FREE = 0 , BEZIER_HANDLE_AUTO = 1 , BEZIER_HANDLE_VECTOR = 2 , BEZIER_HANDLE_ALIGN = 3 }
 
enum  KnotsMode { NURBS_KNOT_MODE_NORMAL = 0 , NURBS_KNOT_MODE_ENDPOINT = 1 , NURBS_KNOT_MODE_BEZIER = 2 , NURBS_KNOT_MODE_ENDPOINT_BEZIER = 3 }
 
enum  NormalMode { NORMAL_MODE_MINIMUM_TWIST = 0 , NORMAL_MODE_Z_UP = 1 , NORMAL_MODE_FREE = 2 }
 
enum  { HA_DS_EXPAND = (1 << 0) , CV_SCULPT_COLLISION_ENABLED = (1 << 1) }
 
enum  eCurvesSymmetryType { CURVES_SYMMETRY_X = 1 << 0 , CURVES_SYMMETRY_Y = 1 << 1 , CURVES_SYMMETRY_Z = 1 << 2 }
 

Macro Definition Documentation

◆ CURVE_TYPES_NUM

#define CURVE_TYPES_NUM   4

◆ CURVES_MATERIAL_NR

#define CURVES_MATERIAL_NR   1

Definition at line 227 of file DNA_curves_types.h.

Referenced by blender::eevee::SyncModule::sync_curves().

Typedef Documentation

◆ Curves

typedef struct Curves Curves

A data-block corresponding to a number of curves of various types with various attributes. Geometry data (as opposed to pointers to other data-blocks and higher level data for user interaction) is embedded in the CurvesGeometry struct.

◆ CurvesGeometry

typedef struct CurvesGeometry CurvesGeometry

A reusable data structure for geometry consisting of many curves. All control point data is stored contiguously for better efficiency when there are many curves. Multiple curve types are supported, as described in CurveType. Data for each curve is accessed by slicing the main #point_data arrays.

The data structure is meant to separate geometry data storage and processing from Blender focused ID data-block handling. The struct can also be embedded to allow reusing it.

◆ CurvesGeometryRuntimeHandle

◆ CurveType

typedef enum CurveType CurveType

◆ eCurvesSymmetryType

◆ HandleType

typedef enum HandleType HandleType

◆ KnotsMode

typedef enum KnotsMode KnotsMode

Method used to calculate a NURBS curve's knot vector.

◆ NormalMode

typedef enum NormalMode NormalMode

Method used to calculate the normals of a curve's evaluated points.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Curves.flag

Enumerator
HA_DS_EXPAND 
CV_SCULPT_COLLISION_ENABLED 

Definition at line 213 of file DNA_curves_types.h.

◆ CurveType

enum CurveType
Enumerator
CURVE_TYPE_CATMULL_ROM 

Catmull Rom curves provide automatic smoothness, like Bezier curves with automatic handle positions. This is the default type for the hair system because of the simplicity of interaction and data storage.

CURVE_TYPE_POLY 

Poly curves (often called "polylines") have no interpolation at all. They evaluate to the same set of points as the original control points. They are a good choice for high-resolution data-sets or when constrained by performance.

CURVE_TYPE_BEZIER 

Bezier curves provide a common intuitive control system made up of handles and control points. Handles are stored separately from positions, and do not store extra generic attribute values. Bezier curves also give the flexibility to set handle types (see HandleType) that influence the number of evaluated points in each segment.

CURVE_TYPE_NURBS 

NURBS curves offer the most flexibility at the cost of increased complexity. Given the choice of different knot modes (see KnotsMode) and different orders (see "nurbs_order" attribute), any of the other types can theoretically be created with a NURBS curve.

Note that Blender currently does not support custom knot vectors, though that should be supported in the long term.

Definition at line 28 of file DNA_curves_types.h.

◆ eCurvesSymmetryType

Curves.symmetry

Enumerator
CURVES_SYMMETRY_X 
CURVES_SYMMETRY_Y 
CURVES_SYMMETRY_Z 

Definition at line 219 of file DNA_curves_types.h.

◆ HandleType

enum HandleType
Enumerator
BEZIER_HANDLE_FREE 

The handle can be moved anywhere, and doesn't influence the point's other handle.

BEZIER_HANDLE_AUTO 

The location is automatically calculated to be smooth.

BEZIER_HANDLE_VECTOR 

The location is calculated to point to the next/previous control point.

BEZIER_HANDLE_ALIGN 

The location is constrained to point in the opposite direction as the other handle.

Definition at line 61 of file DNA_curves_types.h.

◆ KnotsMode

enum KnotsMode

Method used to calculate a NURBS curve's knot vector.

Enumerator
NURBS_KNOT_MODE_NORMAL 
NURBS_KNOT_MODE_ENDPOINT 
NURBS_KNOT_MODE_BEZIER 
NURBS_KNOT_MODE_ENDPOINT_BEZIER 

Definition at line 73 of file DNA_curves_types.h.

◆ NormalMode

enum NormalMode

Method used to calculate the normals of a curve's evaluated points.

Enumerator
NORMAL_MODE_MINIMUM_TWIST 

Calculate normals with the smallest twist around the curve tangent across the whole curve.

NORMAL_MODE_Z_UP 

Calculate normals perpendicular to the Z axis and the curve tangent. If a series of points is vertical, the X axis is used.

NORMAL_MODE_FREE 

Interpolate the stored "custom_normal" attribute for the final normals.

Definition at line 81 of file DNA_curves_types.h.