Blender  V3.3
Macros | Functions | Variables
BPy_SVertex.cpp File Reference
#include "BPy_SVertex.h"
#include "../BPy_Convert.h"
#include "../BPy_Id.h"
#include "../Interface1D/BPy_FEdge.h"

Go to the source code of this file.

Macros

#define MATHUTILS_SUBTYPE_POINT3D   1
 
#define MATHUTILS_SUBTYPE_POINT2D   2
 

Functions

 PyDoc_STRVAR (SVertex_doc, "Class hierarchy: :class:`Interface0D` > :class:`SVertex`\n" "\n" "Class to define a vertex of the embedding.\n" "\n" ".. method:: __init__()\n" " __init__(brother)\n" " __init__(point_3d, id)\n" "\n" " Builds a :class:`SVertex` using the default constructor,\n" " copy constructor or the overloaded constructor which builds" " a :class:`SVertex` from 3D coordinates and an Id.\n" "\n" " :arg brother: A SVertex object.\n" " :type brother: :class:`SVertex`\n" " :arg point_3d: A three-dimensional vector.\n" " :type point_3d: :class:`mathutils.Vector`\n" " :arg id: An Id object.\n" " :type id: :class:`Id`")
 
static int SVertex_init (BPy_SVertex *self, PyObject *args, PyObject *kwds)
 
 PyDoc_STRVAR (SVertex_add_normal_doc, ".. method:: add_normal(normal)\n" "\n" " Adds a normal to the SVertex's set of normals. If the same normal\n" " is already in the set, nothing changes.\n" "\n" " :arg normal: A three-dimensional vector.\n" " :type normal: :class:`mathutils.Vector`, list or tuple of 3 real numbers")
 
static PyObject * SVertex_add_normal (BPy_SVertex *self, PyObject *args, PyObject *kwds)
 
 PyDoc_STRVAR (SVertex_add_fedge_doc, ".. method:: add_fedge(fedge)\n" "\n" " Add an FEdge to the list of edges emanating from this SVertex.\n" "\n" " :arg fedge: An FEdge.\n" " :type fedge: :class:`FEdge`")
 
static PyObject * SVertex_add_fedge (BPy_SVertex *self, PyObject *args, PyObject *kwds)
 
static int SVertex_mathutils_check (BaseMathObject *bmo)
 
static int SVertex_mathutils_get (BaseMathObject *bmo, int subtype)
 
static int SVertex_mathutils_set (BaseMathObject *bmo, int subtype)
 
static int SVertex_mathutils_get_index (BaseMathObject *bmo, int subtype, int index)
 
static int SVertex_mathutils_set_index (BaseMathObject *bmo, int subtype, int index)
 
void SVertex_mathutils_register_callback ()
 
 PyDoc_STRVAR (SVertex_point_3d_doc, "The 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`")
 
static PyObject * SVertex_point_3d_get (BPy_SVertex *self, void *UNUSED(closure))
 
static int SVertex_point_3d_set (BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
 
 PyDoc_STRVAR (SVertex_point_2d_doc, "The projected 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`")
 
static PyObject * SVertex_point_2d_get (BPy_SVertex *self, void *UNUSED(closure))
 
static int SVertex_point_2d_set (BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
 
 PyDoc_STRVAR (SVertex_id_doc, "The Id of this SVertex.\n" "\n" ":type: :class:`Id`")
 
static PyObject * SVertex_id_get (BPy_SVertex *self, void *UNUSED(closure))
 
static int SVertex_id_set (BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
 
 PyDoc_STRVAR (SVertex_normals_doc, "The normals for this Vertex as a list. In a sharp surface, an SVertex\n" "has exactly one normal. In a smooth surface, an SVertex can have any\n" "number of normals.\n" "\n" ":type: list of :class:`mathutils.Vector` objects")
 
static PyObject * SVertex_normals_get (BPy_SVertex *self, void *UNUSED(closure))
 
 PyDoc_STRVAR (SVertex_normals_size_doc, "The number of different normals for this SVertex.\n" "\n" ":type: int")
 
static PyObject * SVertex_normals_size_get (BPy_SVertex *self, void *UNUSED(closure))
 
 PyDoc_STRVAR (SVertex_viewvertex_doc, "If this SVertex is also a ViewVertex, this property refers to the\n" "ViewVertex, and None otherwise.\n" "\n" ":type: :class:`ViewVertex`")
 
static PyObject * SVertex_viewvertex_get (BPy_SVertex *self, void *UNUSED(closure))
 
 PyDoc_STRVAR (SVertex_curvatures_doc, "Curvature information expressed in the form of a seven-element tuple\n" "(K1, e1, K2, e2, Kr, er, dKr), where K1 and K2 are scalar values\n" "representing the first (maximum) and second (minimum) principal\n" "curvatures at this SVertex, respectively; e1 and e2 are\n" "three-dimensional vectors representing the first and second principal\n" "directions, i.e. the directions of the normal plane where the\n" "curvature takes its maximum and minimum values, respectively; and Kr,\n" "er and dKr are the radial curvature, radial direction, and the\n" "derivative of the radial curvature at this SVertex, respectively.\n" "\n" ":type: tuple")
 
static PyObject * SVertex_curvatures_get (BPy_SVertex *self, void *UNUSED(closure))
 

Variables

static PyMethodDef BPy_SVertex_methods []
 
static Mathutils_Callback SVertex_mathutils_cb
 
static unsigned char SVertex_mathutils_cb_index = -1
 
static PyGetSetDef BPy_SVertex_getseters []
 
PyTypeObject SVertex_Type
 

Macro Definition Documentation

◆ MATHUTILS_SUBTYPE_POINT2D

#define MATHUTILS_SUBTYPE_POINT2D   2

Definition at line 138 of file BPy_SVertex.cpp.

◆ MATHUTILS_SUBTYPE_POINT3D

#define MATHUTILS_SUBTYPE_POINT3D   1

Definition at line 137 of file BPy_SVertex.cpp.

Function Documentation

◆ PyDoc_STRVAR() [1/10]

PyDoc_STRVAR ( SVertex_add_fedge_doc  ,
".. method:: add_fedge(fedge)\n" "\n" " Add an FEdge to the list of edges emanating from this SVertex.\n" "\n" " :arg fedge: An FEdge.\n" " :type fedge: :class:`FEdge`"   
)

◆ PyDoc_STRVAR() [2/10]

PyDoc_STRVAR ( SVertex_add_normal_doc  ,
".. method:: add_normal(normal)\n" "\n" " Adds a normal to the SVertex's set of normals. If the same normal\n" " is already in the  set,
nothing changes.\n" "\n" " :arg normal:A three-dimensional vector.\n" " :type normal::class:`mathutils.Vector`  ,
list or tuple of 3 real numbers"   
)

◆ PyDoc_STRVAR() [3/10]

PyDoc_STRVAR ( SVertex_curvatures_doc  ,
"Curvature information expressed in the form of a seven-element tuple\n" "  K1, e1, K2, e2, Kr, er, dKr,
where K1 and K2 are scalar values\n" "representing the first(maximum) and second(minimum) principal\n" "curvatures at this  SVertex,
respectively;e1 and e2 are\n" "three-dimensional vectors representing the first and second principal\n" "  directions,
i.e. the directions of the normal plane where the\n" "curvature takes its maximum and minimum  values,
respectively;and  Kr,
\n" "er and dKr are the radial  curvature,
radial  direction,
and the\n" "derivative of the radial curvature at this  SVertex,
respectively.\n" "\n" ":type:tuple"   
)

◆ PyDoc_STRVAR() [4/10]

PyDoc_STRVAR ( SVertex_doc  ,
"Class hierarchy: :class:`Interface0D ,
:class:`SVertex`\n" "\n" "Class to define a vertex of the embedding.\n" "\n" ".. method::__init__()\n" " __init__(brother)\n" " __init__(point_3d, id)\n" "\n" " Builds a :class:`SVertex` using the default  constructor,
\n" " copy constructor or the overloaded constructor which builds" " a :class:`SVertex` from 3D coordinates and an Id.\n" "\n" " :arg brother:A SVertex object.\n" " :type brother::class:`SVertex`\n" " :arg point_3d:A three-dimensional vector.\n" " :type point_3d::class:`mathutils.Vector`\n" " :arg id:An Id object.\n" " :type id::class:`Id`"   
)

◆ PyDoc_STRVAR() [5/10]

PyDoc_STRVAR ( SVertex_id_doc  ,
"The Id of this SVertex.\n" "\n" ":type: :class:`Id`"   
)

◆ PyDoc_STRVAR() [6/10]

PyDoc_STRVAR ( SVertex_normals_doc  ,
"The normals for this Vertex as a list. In a sharp  surface,
an SVertex\n" "has exactly one normal. In a smooth  surface,
an SVertex can have any\n" "number of normals.\n" "\n" ":type:list of :class:`mathutils.Vector` objects"   
)

◆ PyDoc_STRVAR() [7/10]

PyDoc_STRVAR ( SVertex_normals_size_doc  ,
"The number of different normals for this SVertex.\n" "\n" ":type: int"   
)

◆ PyDoc_STRVAR() [8/10]

PyDoc_STRVAR ( SVertex_point_2d_doc  ,
"The projected 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`"   
)

◆ PyDoc_STRVAR() [9/10]

PyDoc_STRVAR ( SVertex_point_3d_doc  ,
"The 3D coordinates of the SVertex.\n" "\n" ":type: :class:`mathutils.Vector`"   
)

◆ PyDoc_STRVAR() [10/10]

PyDoc_STRVAR ( SVertex_viewvertex_doc  ,
"If this SVertex is also a  ViewVertex,
this property refers to the\n" "  ViewVertex,
and None otherwise.\n" "\n" ":type::class:`ViewVertex`"   
)

◆ SVertex_add_fedge()

static PyObject* SVertex_add_fedge ( BPy_SVertex self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 108 of file BPy_SVertex.cpp.

References FEdge_Type.

◆ SVertex_add_normal()

static PyObject* SVertex_add_normal ( BPy_SVertex self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 82 of file BPy_SVertex.cpp.

References Vec3r_ptr_from_PyObject().

◆ SVertex_curvatures_get()

static PyObject* SVertex_curvatures_get ( BPy_SVertex self,
void UNUSEDclosure 
)
static

◆ SVertex_id_get()

static PyObject* SVertex_id_get ( BPy_SVertex self,
void UNUSEDclosure 
)
static

Definition at line 312 of file BPy_SVertex.cpp.

References BPy_Id_from_Id(), id, and self.

◆ SVertex_id_set()

static int SVertex_id_set ( BPy_SVertex self,
PyObject *  value,
void UNUSEDclosure 
)
static

Definition at line 318 of file BPy_SVertex.cpp.

References BPy_Id_Check.

◆ SVertex_init()

static int SVertex_init ( BPy_SVertex self,
PyObject *  args,
PyObject *  kwds 
)
static

Definition at line 43 of file BPy_SVertex.cpp.

References convert_v3(), Id_Type, SVertex_Type, and v.

◆ SVertex_mathutils_check()

static int SVertex_mathutils_check ( BaseMathObject bmo)
static

Definition at line 140 of file BPy_SVertex.cpp.

References BPy_SVertex_Check.

◆ SVertex_mathutils_get()

static int SVertex_mathutils_get ( BaseMathObject bmo,
int  subtype 
)
static

Definition at line 148 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, and MATHUTILS_SUBTYPE_POINT3D.

◆ SVertex_mathutils_get_index()

static int SVertex_mathutils_get_index ( BaseMathObject bmo,
int  subtype,
int  index 
)
static

Definition at line 186 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, and MATHUTILS_SUBTYPE_POINT3D.

◆ SVertex_mathutils_register_callback()

void SVertex_mathutils_register_callback ( )

◆ SVertex_mathutils_set()

static int SVertex_mathutils_set ( BaseMathObject bmo,
int  subtype 
)
static

Definition at line 168 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, and MATHUTILS_SUBTYPE_POINT3D.

◆ SVertex_mathutils_set_index()

static int SVertex_mathutils_set_index ( BaseMathObject bmo,
int  subtype,
int  index 
)
static

Definition at line 226 of file BPy_SVertex.cpp.

References MATHUTILS_SUBTYPE_POINT2D, MATHUTILS_SUBTYPE_POINT3D, and self.

◆ SVertex_normals_get()

static PyObject* SVertex_normals_get ( BPy_SVertex self,
void UNUSEDclosure 
)
static

Definition at line 335 of file BPy_SVertex.cpp.

References normals, v, and Vector_from_Vec3r().

◆ SVertex_normals_size_get()

static PyObject* SVertex_normals_size_get ( BPy_SVertex self,
void UNUSEDclosure 
)
static

Definition at line 355 of file BPy_SVertex.cpp.

References self.

◆ SVertex_point_2d_get()

static PyObject* SVertex_point_2d_get ( BPy_SVertex self,
void UNUSEDclosure 
)
static

◆ SVertex_point_2d_set()

static int SVertex_point_2d_set ( BPy_SVertex self,
PyObject *  value,
void UNUSEDclosure 
)
static

Definition at line 296 of file BPy_SVertex.cpp.

References mathutils_array_parse(), and v.

◆ SVertex_point_3d_get()

static PyObject* SVertex_point_3d_get ( BPy_SVertex self,
void UNUSEDclosure 
)
static

◆ SVertex_point_3d_set()

static int SVertex_point_3d_set ( BPy_SVertex self,
PyObject *  value,
void UNUSEDclosure 
)
static

Definition at line 274 of file BPy_SVertex.cpp.

References mathutils_array_parse(), and v.

◆ SVertex_viewvertex_get()

static PyObject* SVertex_viewvertex_get ( BPy_SVertex self,
void UNUSEDclosure 
)
static

Definition at line 366 of file BPy_SVertex.cpp.

References Any_BPy_ViewVertex_from_ViewVertex().

Variable Documentation

◆ BPy_SVertex_getseters

PyGetSetDef BPy_SVertex_getseters[]
static
Initial value:
= {
{"point_3d",
SVertex_point_3d_doc,
nullptr},
{"point_2d",
SVertex_point_2d_doc,
nullptr},
{"id", (getter)SVertex_id_get, (setter)SVertex_id_set, SVertex_id_doc, nullptr},
{"normals", (getter)SVertex_normals_get, (setter) nullptr, SVertex_normals_doc, nullptr},
{"normals_size",
(setter) nullptr,
SVertex_normals_size_doc,
nullptr},
{"viewvertex",
(setter) nullptr,
SVertex_viewvertex_doc,
nullptr},
{"curvatures",
(setter) nullptr,
SVertex_curvatures_doc,
nullptr},
{nullptr, nullptr, nullptr, nullptr, nullptr}
}
static int SVertex_point_2d_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
static PyObject * SVertex_curvatures_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject * SVertex_point_3d_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject * SVertex_point_2d_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject * SVertex_normals_size_get(BPy_SVertex *self, void *UNUSED(closure))
static int SVertex_point_3d_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
static PyObject * SVertex_id_get(BPy_SVertex *self, void *UNUSED(closure))
static int SVertex_id_set(BPy_SVertex *self, PyObject *value, void *UNUSED(closure))
static PyObject * SVertex_viewvertex_get(BPy_SVertex *self, void *UNUSED(closure))
static PyObject * SVertex_normals_get(BPy_SVertex *self, void *UNUSED(closure))

Definition at line 409 of file BPy_SVertex.cpp.

◆ BPy_SVertex_methods

PyMethodDef BPy_SVertex_methods[]
static
Initial value:
= {
{"add_normal",
(PyCFunction)SVertex_add_normal,
METH_VARARGS | METH_KEYWORDS,
SVertex_add_normal_doc},
{"add_fedge",
(PyCFunction)SVertex_add_fedge,
METH_VARARGS | METH_KEYWORDS,
SVertex_add_fedge_doc},
{nullptr, nullptr, 0, nullptr},
}
static PyObject * SVertex_add_fedge(BPy_SVertex *self, PyObject *args, PyObject *kwds)
static PyObject * SVertex_add_normal(BPy_SVertex *self, PyObject *args, PyObject *kwds)
Definition: BPy_SVertex.cpp:82

Definition at line 122 of file BPy_SVertex.cpp.

◆ SVertex_mathutils_cb

Mathutils_Callback SVertex_mathutils_cb
static
Initial value:
= {
}
static int SVertex_mathutils_set_index(BaseMathObject *bmo, int subtype, int index)
static int SVertex_mathutils_get(BaseMathObject *bmo, int subtype)
static int SVertex_mathutils_set(BaseMathObject *bmo, int subtype)
static int SVertex_mathutils_get_index(BaseMathObject *bmo, int subtype, int index)
static int SVertex_mathutils_check(BaseMathObject *bmo)

Definition at line 246 of file BPy_SVertex.cpp.

Referenced by SVertex_mathutils_register_callback().

◆ SVertex_mathutils_cb_index

unsigned char SVertex_mathutils_cb_index = -1
static

◆ SVertex_Type

PyTypeObject SVertex_Type