Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/volume.cpp
- This file was added.
| /* | |||||
| * Copyright 2020 Blender Foundation | |||||
| * | |||||
| * 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 | |||||
| * | |||||
| * http://www.apache.org/licenses/LICENSE-2.0 | |||||
| * | |||||
| * 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. | |||||
| */ | |||||
| #include "render/volume.h" | |||||
| CCL_NAMESPACE_BEGIN | |||||
| NODE_DEFINE(Volume) | |||||
| { | |||||
| NodeType *type = NodeType::add("volume", create, NodeType::NONE, Geometry::node_base_type); | |||||
| SOCKET_INT_ARRAY(triangles, "Triangles", array<int>()); | |||||
| SOCKET_POINT_ARRAY(verts, "Vertices", array<float3>()); | |||||
| SOCKET_INT_ARRAY(shader, "Shader", array<int>()); | |||||
| SOCKET_FLOAT(clipping, "Clipping", 0.001f); | |||||
| SOCKET_FLOAT(step_size, "Step Size", 0.0f); | |||||
| SOCKET_BOOLEAN(object_space, "Object Space", false); | |||||
| return type; | |||||
| } | |||||
| Volume::Volume() : Mesh(node_type, Geometry::VOLUME) | |||||
| { | |||||
| clipping = 0.001f; | |||||
| step_size = 0.0f; | |||||
| object_space = false; | |||||
| } | |||||
| void Volume::clear() | |||||
| { | |||||
| Mesh::clear(true); | |||||
| } | |||||
| CCL_NAMESPACE_END | |||||