Blender  V3.3
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Freestyle::BlenderStrokeRenderer Class Reference

#include <BlenderStrokeRenderer.h>

Inheritance diagram for Freestyle::BlenderStrokeRenderer:
Freestyle::StrokeRenderer

Classes

struct  StrokeGroup
 

Public Member Functions

 BlenderStrokeRenderer (Render *re, int render_count)
 
virtual ~BlenderStrokeRenderer ()
 
virtual void RenderStrokeRep (StrokeRep *iStrokeRep) const
 
virtual void RenderStrokeRepBasic (StrokeRep *iStrokeRep) const
 
ObjectNewMesh () const
 
int GenerateScene ()
 
void GenerateStrokeMesh (StrokeGroup *group, bool hasTex)
 
void FreeStrokeGroups ()
 
RenderRenderScene (Render *re, bool render)
 
- Public Member Functions inherited from Freestyle::StrokeRenderer
virtual ~StrokeRenderer ()
 

Static Public Member Functions

static MaterialGetStrokeShader (Main *bmain, bNodeTree *iNodeTree, bool do_id_user)
 
- Static Public Member Functions inherited from Freestyle::StrokeRenderer
static bool loadTextures ()
 

Public Attributes

vector< StrokeGroup * > strokeGroups
 
vector< StrokeGroup * > texturedStrokeGroups
 

Protected Member Functions

int get_stroke_count () const
 
float get_stroke_vertex_z (void) const
 
unsigned int get_stroke_mesh_id (void) const
 
bool test_triangle_visibility (StrokeVertexRep *svRep[3]) const
 
void test_strip_visibility (Strip::vertex_container &strip_vertices, int *visible_faces, int *visible_segments) const
 

Protected Attributes

Mainfreestyle_bmain
 
Sceneold_scene
 
Scenefreestyle_scene
 
Depsgraphfreestyle_depsgraph
 
bContext_context
 
float _width
 
float _height
 
float _z
 
float _z_delta
 
unsigned int _mesh_id
 
bool _use_shading_nodes
 
struct GHash_nodetree_hash
 
vector< StrokeRep * > _strokeReps
 

Static Protected Attributes

static const char * uvNames [] = {"along_stroke", "along_stroke_tips"}
 

Additional Inherited Members

- Static Public Attributes inherited from Freestyle::StrokeRenderer
static TextureManager_textureManager = nullptr
 

Detailed Description

Definition at line 28 of file BlenderStrokeRenderer.h.

Constructor & Destructor Documentation

◆ BlenderStrokeRenderer()

Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer ( Render re,
int  render_count 
)

◆ ~BlenderStrokeRenderer()

Freestyle::BlenderStrokeRenderer::~BlenderStrokeRenderer ( )
virtual

Member Function Documentation

◆ FreeStrokeGroups()

void Freestyle::BlenderStrokeRenderer::FreeStrokeGroups ( )

Definition at line 528 of file BlenderStrokeRenderer.cpp.

References strokeGroups, and texturedStrokeGroups.

Referenced by ~BlenderStrokeRenderer().

◆ GenerateScene()

int Freestyle::BlenderStrokeRenderer::GenerateScene ( )

◆ GenerateStrokeMesh()

void Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh ( StrokeGroup group,
bool  hasTex 
)

Definition at line 561 of file BlenderStrokeRenderer.cpp.

References MLoopCol::a, Freestyle::StrokeVertexRep::alpha(), MLoopCol::b, BKE_mesh_normals_tag_dirty(), BKE_mesh_update_customdata_pointers(), BKE_mesh_validate(), BKE_object_add(), BKE_object_materials_test(), BLI_assert, CD_CALLOC, CD_MEDGE, CD_MLOOP, CD_MLOOPUV, CD_MPOLY, CD_MVERT, CD_PROP_BYTE_COLOR, MVert::co, color, copy_v3fl_v3db(), CustomData_add_layer(), CustomData_add_layer_named(), CustomData_set_layer_active(), Object::data, DEG_relations_tag_update(), MLoop::e, Mesh::edata, ListBase::first, freestyle_bmain, freestyle_scene, MLoopCol::g, get_stroke_vertex_z(), Material::id, id_us_plus(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), L, Mesh::ldata, linearrgb_to_srgb_uchar4(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), MPoly::loopstart, Mesh::mat, MPoly::mat_nr, material, Freestyle::BlenderStrokeRenderer::StrokeGroup::materials, Mesh::medge, MEM_mallocN, mesh, Mesh::mloop, Mesh::mloopcol, Mesh::mloopuv, Mesh::mpoly, Mesh::mvert, NewMesh(), OB_MESH, Mesh::pdata, Freestyle::StrokeVertexRep::point2d(), r, MLoopCol::r, usdtokens::rgba(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), Freestyle::BlenderStrokeRenderer::StrokeGroup::strokes, test_strip_visibility(), test_triangle_visibility(), Freestyle::StrokeVertexRep::texCoord(), Mesh::totcol, Freestyle::BlenderStrokeRenderer::StrokeGroup::totedge, Mesh::totedge, Freestyle::BlenderStrokeRenderer::StrokeGroup::totloop, Mesh::totloop, MPoly::totloop, Freestyle::BlenderStrokeRenderer::StrokeGroup::totpoly, Mesh::totpoly, Freestyle::BlenderStrokeRenderer::StrokeGroup::totvert, Mesh::totvert, MLoopUV::uv, uvNames, v, MLoop::v, MEdge::v1, MEdge::v2, Mesh::vdata, Scene::view_layers, Freestyle::VecMat::Vec2< T >::x(), and Freestyle::VecMat::Vec2< T >::y().

Referenced by GenerateScene().

◆ get_stroke_count()

int Freestyle::BlenderStrokeRenderer::get_stroke_count ( ) const
protected

Definition at line 555 of file BlenderStrokeRenderer.cpp.

References strokeGroups, and texturedStrokeGroups.

Referenced by GenerateScene(), and RenderScene().

◆ get_stroke_mesh_id()

unsigned int Freestyle::BlenderStrokeRenderer::get_stroke_mesh_id ( void  ) const
protected

Definition at line 188 of file BlenderStrokeRenderer.cpp.

References _mesh_id.

Referenced by NewMesh().

◆ get_stroke_vertex_z()

float Freestyle::BlenderStrokeRenderer::get_stroke_vertex_z ( void  ) const
protected

Definition at line 177 of file BlenderStrokeRenderer.cpp.

References _z, _z_delta, and z.

Referenced by GenerateStrokeMesh().

◆ GetStrokeShader()

Material * Freestyle::BlenderStrokeRenderer::GetStrokeShader ( Main bmain,
bNodeTree iNodeTree,
bool  do_id_user 
)
static

◆ NewMesh()

Object * Freestyle::BlenderStrokeRenderer::NewMesh ( ) const

◆ RenderScene()

Render * Freestyle::BlenderStrokeRenderer::RenderScene ( Render re,
bool  render 
)

◆ RenderStrokeRep()

void Freestyle::BlenderStrokeRenderer::RenderStrokeRep ( StrokeRep iStrokeRep) const
virtual

Renders a stroke rep

Implements Freestyle::StrokeRenderer.

Definition at line 411 of file BlenderStrokeRenderer.cpp.

References RenderStrokeRepBasic().

◆ RenderStrokeRepBasic()

void Freestyle::BlenderStrokeRenderer::RenderStrokeRepBasic ( StrokeRep iStrokeRep) const
virtual

◆ test_strip_visibility()

void Freestyle::BlenderStrokeRenderer::test_strip_visibility ( Strip::vertex_container strip_vertices,
int *  visible_faces,
int *  visible_segments 
) const
protected

Definition at line 493 of file BlenderStrokeRenderer.cpp.

References test_triangle_visibility(), and v.

Referenced by GenerateStrokeMesh(), and RenderStrokeRepBasic().

◆ test_triangle_visibility()

bool Freestyle::BlenderStrokeRenderer::test_triangle_visibility ( StrokeVertexRep svRep[3]) const
protected

Member Data Documentation

◆ _context

bContext* Freestyle::BlenderStrokeRenderer::_context
protected

Definition at line 65 of file BlenderStrokeRenderer.h.

◆ _height

float Freestyle::BlenderStrokeRenderer::_height
protected

Definition at line 66 of file BlenderStrokeRenderer.h.

Referenced by BlenderStrokeRenderer(), and test_triangle_visibility().

◆ _mesh_id

unsigned int Freestyle::BlenderStrokeRenderer::_mesh_id
protected

Definition at line 68 of file BlenderStrokeRenderer.h.

Referenced by BlenderStrokeRenderer(), and get_stroke_mesh_id().

◆ _nodetree_hash

struct GHash* Freestyle::BlenderStrokeRenderer::_nodetree_hash
protected

◆ _strokeReps

vector<StrokeRep *> Freestyle::BlenderStrokeRenderer::_strokeReps
protected

Definition at line 82 of file BlenderStrokeRenderer.h.

◆ _use_shading_nodes

bool Freestyle::BlenderStrokeRenderer::_use_shading_nodes
protected

Definition at line 69 of file BlenderStrokeRenderer.h.

◆ _width

float Freestyle::BlenderStrokeRenderer::_width
protected

Definition at line 66 of file BlenderStrokeRenderer.h.

Referenced by BlenderStrokeRenderer(), and test_triangle_visibility().

◆ _z

float Freestyle::BlenderStrokeRenderer::_z
protected

Definition at line 67 of file BlenderStrokeRenderer.h.

Referenced by BlenderStrokeRenderer(), get_stroke_vertex_z(), and RenderScene().

◆ _z_delta

float Freestyle::BlenderStrokeRenderer::_z_delta
protected

Definition at line 67 of file BlenderStrokeRenderer.h.

Referenced by BlenderStrokeRenderer(), get_stroke_vertex_z(), and RenderScene().

◆ freestyle_bmain

Main* Freestyle::BlenderStrokeRenderer::freestyle_bmain
protected

◆ freestyle_depsgraph

Depsgraph* Freestyle::BlenderStrokeRenderer::freestyle_depsgraph
protected

◆ freestyle_scene

Scene* Freestyle::BlenderStrokeRenderer::freestyle_scene
protected

◆ old_scene

Scene* Freestyle::BlenderStrokeRenderer::old_scene
protected

Definition at line 62 of file BlenderStrokeRenderer.h.

Referenced by BlenderStrokeRenderer().

◆ strokeGroups

vector<StrokeGroup *> Freestyle::BlenderStrokeRenderer::strokeGroups

Definition at line 50 of file BlenderStrokeRenderer.h.

Referenced by FreeStrokeGroups(), GenerateScene(), and get_stroke_count().

◆ texturedStrokeGroups

vector<StrokeGroup *> Freestyle::BlenderStrokeRenderer::texturedStrokeGroups

◆ uvNames

const char * Freestyle::BlenderStrokeRenderer::uvNames = {"along_stroke", "along_stroke_tips"}
staticprotected

Definition at line 72 of file BlenderStrokeRenderer.h.

Referenced by GenerateStrokeMesh(), and GetStrokeShader().


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