2011-04-27 11:58:34 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2011, Blender Foundation.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __OBJECT_H__
|
|
|
|
#define __OBJECT_H__
|
|
|
|
|
|
|
|
#include "util_boundbox.h"
|
|
|
|
#include "util_param.h"
|
|
|
|
#include "util_transform.h"
|
|
|
|
#include "util_types.h"
|
|
|
|
|
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
class Device;
|
|
|
|
class DeviceScene;
|
|
|
|
class Mesh;
|
|
|
|
class Progress;
|
|
|
|
class Scene;
|
2011-05-03 18:29:11 +00:00
|
|
|
struct Transform;
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
/* Object */
|
|
|
|
|
|
|
|
class Object {
|
|
|
|
public:
|
|
|
|
Mesh *mesh;
|
|
|
|
Transform tfm;
|
|
|
|
BoundBox bounds;
|
|
|
|
ustring name;
|
2012-06-03 09:50:17 +00:00
|
|
|
uint random_id;
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
int pass_id;
|
2011-04-27 11:58:34 +00:00
|
|
|
vector<ParamValue> attributes;
|
2011-09-01 15:53:36 +00:00
|
|
|
uint visibility;
|
2012-04-30 12:49:26 +00:00
|
|
|
MotionTransform motion;
|
|
|
|
bool use_motion;
|
2012-05-02 09:33:45 +00:00
|
|
|
bool use_holdout;
|
2012-12-28 14:21:30 +00:00
|
|
|
bool curverender;
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-10-04 21:40:39 +00:00
|
|
|
float3 dupli_generated;
|
|
|
|
float2 dupli_uv;
|
|
|
|
|
2012-06-08 16:17:57 +00:00
|
|
|
int particle_id;
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
Object();
|
|
|
|
~Object();
|
|
|
|
|
|
|
|
void tag_update(Scene *scene);
|
|
|
|
|
2012-10-17 17:27:30 +00:00
|
|
|
void compute_bounds(bool motion_blur, float shuttertime);
|
2011-04-27 11:58:34 +00:00
|
|
|
void apply_transform();
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Object Manager */
|
|
|
|
|
|
|
|
class ObjectManager {
|
|
|
|
public:
|
|
|
|
bool need_update;
|
|
|
|
|
|
|
|
ObjectManager();
|
|
|
|
~ObjectManager();
|
|
|
|
|
|
|
|
void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress& progress);
|
2012-12-01 19:15:05 +00:00
|
|
|
void device_update_transforms(Device *device, DeviceScene *dscene, Scene *scene, uint *object_flag, Progress& progress);
|
2011-04-27 11:58:34 +00:00
|
|
|
void device_free(Device *device, DeviceScene *dscene);
|
|
|
|
|
|
|
|
void tag_update(Scene *scene);
|
|
|
|
|
2013-04-17 20:07:22 +00:00
|
|
|
void apply_static_transforms(DeviceScene *dscene, Scene *scene, uint *object_flag, Progress& progress);
|
2011-04-27 11:58:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CCL_NAMESPACE_END
|
|
|
|
|
|
|
|
#endif /* __OBJECT_H__ */
|
|
|
|
|