aboutsummaryrefslogtreecommitdiff
path: root/vrayPlug/plugin/shaveVrayTriVoxelPrim.h
blob: f68c981fd20d15567e774f26d201526069a9257c (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _HAIR_VR_tri_VOXEL_PRIMITIVE_H_
#define _HAIR_VR_tri_VOXEL_PRIMITIVE_H_

// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962

/**********************************************************************
 *<
	FILE:			shaveVrayTriVoxelPrim.h 

	DESCRIPTION:	Generic instanced hair voxel primitive

	CREATED BY:		Vladimir Dubovoy <[email protected]>

	HISTORY:		created  12-05-2010 

 *>
 **********************************************************************/

#include "utils.h"
#include "box.h"
#include "rayserver.h"
#include "vrayplugins.h"
#include "rayserver.h"
#include "geometryclasses.h"

#include "hairAPIvrayutil.h"
#include "shaveVrayTriShadeData.h"
#include "shaveVrayVoxelPrimBase.h"

class shaveVrayInstanceI;

//#define OWN_SHADEABLE_FOR_TRI

class shaveVrayTriVoxelPrim : public shaveVrayVoxelPrimBase  {
public:
	shaveVrayTriVoxelPrim(IHairVoxel* vox, VR::VRayCore* vray, shaveVrayInstanceI* inst);
	virtual ~shaveVrayTriVoxelPrim();

protected:
	
	//const member access
	inline shaveVrayInstanceI*     hinst()	 const {return m_hinst;}
	inline VR::Shadeable*		   shade()	 const {return m_shade;}
	inline shaveVrayTriShadeData*  shdata()	 const {return m_shdata;}
	
	//member access
	inline shaveVrayInstanceI*&    _hinst()		 {return m_hinst;}
	inline VR::Shadeable*&		   _shade()	     {return m_shade;}
	inline shaveVrayTriShadeData*& _shdata()	 {return m_shdata;}

private:

	shaveVrayInstanceI*    m_hinst;
	VR::Shadeable*		   m_shade; 
	shaveVrayTriShadeData* m_shdata;
};

#endif	//end of_HAIR_VR_tri_VOXEL_PRIMITIVE_H_