blob: 69d0de4af1445a737cdb9cb15f64bb9d55eddd56 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962
/**********************************************************************
*<
FILE: shaveVrayTriVoxelPrim.cpp
DESCRIPTION: Generic instanced hair voxel primitive
CREATED BY: Vladimir Dubovoy <[email protected]>
HISTORY: created 13-05-2010
*>
**********************************************************************/
#include "assert.h"
#include "shaveVrayTriVoxelPrim.h"
#include "shaveVrayTriShadeable.h"
//#include "shaveVrayShadeData.h"
#include "shaveVrayInstanceI.h"
shaveVrayTriVoxelPrim::shaveVrayTriVoxelPrim(IHairVoxel* vox, VR::VRayCore* vray,
shaveVrayInstanceI* inst):
shaveVrayVoxelPrimBase(vox,vray)
{
_hinst() = inst;
shaveVrayTriShadeable* sh = new shaveVrayTriShadeable(this);
if(vray)
{
sh->initBSDFpool(vray);
}
_shade() = sh;
_shdata() = new shaveVrayTriShadeData(hinst());
}
shaveVrayTriVoxelPrim::~shaveVrayTriVoxelPrim()
{
if(shade())
delete shade();
}
|