mirror of https://github.com/axmolengine/axmol.git
rename BillBoard Model
This commit is contained in:
parent
58f4e84b9a
commit
4e65d070a1
|
@ -33,7 +33,7 @@ NS_CC_BEGIN
|
|||
|
||||
BillBorad::BillBorad()
|
||||
: _zDepthInView(0.0f)
|
||||
, _mode(Mode::View_Oriented)
|
||||
, _mode(Mode::View_Point_Oriented)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ void BillBorad::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
|||
Vec3 camDir;
|
||||
switch (_mode)
|
||||
{
|
||||
case Mode::View_Oriented:
|
||||
case Mode::View_Point_Oriented:
|
||||
camDir = Vec3(transform.m[12] - camWorldMat.m[12], transform.m[13] - camWorldMat.m[13], transform.m[14] - camWorldMat.m[14]);
|
||||
break;
|
||||
case Mode::View_Plane_Oriented:
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
enum class Mode
|
||||
{
|
||||
View_Oriented,
|
||||
View_Point_Oriented,
|
||||
View_Plane_Oriented
|
||||
};
|
||||
/// @{
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
*
|
||||
* @return An autoreleased BillBorad object.
|
||||
*/
|
||||
static BillBorad* create(Mode mode = Mode::View_Oriented);
|
||||
static BillBorad* create(Mode mode = Mode::View_Point_Oriented);
|
||||
|
||||
/**
|
||||
* Creates a BillBorad with an image filename.
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
* @param filename A path to image file, e.g., "scene1/monster.png"
|
||||
* @return An autoreleased BillBorad object.
|
||||
*/
|
||||
static BillBorad* create(const std::string& filename, Mode mode = Mode::View_Oriented);
|
||||
static BillBorad* create(const std::string& filename, Mode mode = Mode::View_Point_Oriented);
|
||||
|
||||
/**
|
||||
* Creates a BillBorad with an image filename and a rect.
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
* @param rect A subrect of the image file
|
||||
* @return An autoreleased BillBorad object
|
||||
*/
|
||||
static BillBorad* create(const std::string& filename, const Rect& rect, Mode mode = Mode::View_Oriented);
|
||||
static BillBorad* create(const std::string& filename, const Rect& rect, Mode mode = Mode::View_Point_Oriented);
|
||||
|
||||
/**
|
||||
* Creates a BillBorad with a Texture2D object.
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
* @param texture A pointer to a Texture2D object.
|
||||
* @return An autoreleased BillBorad object
|
||||
*/
|
||||
static BillBorad* createWithTexture(Texture2D *texture, Mode mode = Mode::View_Oriented);
|
||||
static BillBorad* createWithTexture(Texture2D *texture, Mode mode = Mode::View_Point_Oriented);
|
||||
|
||||
/** Set the billboard rotation mode. */
|
||||
void setMode(Mode mode);
|
||||
|
|
Loading…
Reference in New Issue