2011-04-27 11:58:34 +00:00
|
|
|
/*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Copyright 2011-2013 Blender Foundation
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License
|
2011-04-27 11:58:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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;
|
2014-02-25 17:29:11 +00:00
|
|
|
class ParticleSystem;
|
2011-04-27 11:58:34 +00:00
|
|
|
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;
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-10-04 21:40:39 +00:00
|
|
|
float3 dupli_generated;
|
|
|
|
float2 dupli_uv;
|
|
|
|
|
2014-02-25 17:29:11 +00:00
|
|
|
ParticleSystem *particle_system;
|
|
|
|
int particle_index;
|
2014-03-29 12:03:46 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
Object();
|
|
|
|
~Object();
|
|
|
|
|
|
|
|
void tag_update(Scene *scene);
|
|
|
|
|
2014-03-29 12:03:46 +00:00
|
|
|
void compute_bounds(bool motion_blur);
|
2011-04-27 11:58:34 +00:00
|
|
|
void apply_transform();
|
2014-03-29 12:03:46 +00:00
|
|
|
|
|
|
|
vector<float> motion_times();
|
2011-04-27 11:58:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* 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__ */
|
|
|
|
|