mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 09:59:10 -07:00
Add @private tag for alternativa3d namespace fields
This commit is contained in:
@@ -39,12 +39,21 @@ package alternativa.engine3d.core {
|
||||
// Collector
|
||||
protected var collector:DrawUnit;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var camera:Camera3D;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var drawUnits:Vector.<DrawUnit> = new Vector.<DrawUnit>();
|
||||
|
||||
protected var _contextProperties:RendererContext3DProperties;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param context3D
|
||||
*/
|
||||
alternativa3d function render(context3D:Context3D):void {
|
||||
updateContext3D(context3D);
|
||||
|
||||
@@ -91,6 +100,16 @@ package alternativa.engine3d.core {
|
||||
drawUnits.length = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param object
|
||||
* @param program
|
||||
* @param indexBuffer
|
||||
* @param firstIndex
|
||||
* @param numTriangles
|
||||
* @param debugShader
|
||||
* @return
|
||||
*/
|
||||
alternativa3d function createDrawUnit(object:Object3D, program:Program3D, indexBuffer:IndexBuffer3D, firstIndex:int, numTriangles:int, debugShader:ShaderProgram = null):DrawUnit {
|
||||
var res:DrawUnit;
|
||||
if (collector != null) {
|
||||
@@ -109,6 +128,12 @@ package alternativa.engine3d.core {
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param drawUnit
|
||||
* @param renderPriority
|
||||
*/
|
||||
|
||||
alternativa3d function addDrawUnit(drawUnit:DrawUnit, renderPriority:int):void {
|
||||
// Increase array of priorities, if it is necessary
|
||||
if (renderPriority >= drawUnits.length) drawUnits.length = renderPriority + 1;
|
||||
@@ -209,6 +234,12 @@ package alternativa.engine3d.core {
|
||||
_contextProperties.usedTextures = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param list
|
||||
* @param direction
|
||||
* @return
|
||||
*/
|
||||
alternativa3d function sortByAverageZ(list:DrawUnit, direction:Boolean = true):DrawUnit {
|
||||
var left:DrawUnit = list;
|
||||
var right:DrawUnit = list.next;
|
||||
|
||||
@@ -26,21 +26,38 @@ package alternativa.engine3d.effects {
|
||||
public var scale:Number = 1;
|
||||
|
||||
public var boundBox:BoundBox;
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var next:ParticleEffect;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var nextInSystem:ParticleEffect;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var system:ParticleSystem;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var startTime:Number;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var lifeTime:Number = Number.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var particleList:Particle;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var aabb:BoundBox = new BoundBox();
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var keyPosition:Vector3D;
|
||||
|
||||
protected var keyDirection:Vector3D;
|
||||
@@ -127,7 +144,10 @@ package alternativa.engine3d.effects {
|
||||
protected function setLife(time:Number):void {
|
||||
lifeTime = time;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function calculateAABB():void {
|
||||
aabb.minX = boundBox.minX*scale + _position.x;
|
||||
aabb.minY = boundBox.minY*scale + _position.y;
|
||||
@@ -136,7 +156,10 @@ package alternativa.engine3d.effects {
|
||||
aabb.maxY = boundBox.maxY*scale + _position.y;
|
||||
aabb.maxZ = boundBox.maxZ*scale + _position.z;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function setPositionKeys(time:Number):void {
|
||||
for (var i:int = 0; i < keysCount; i++) {
|
||||
if (time <= timeKeys[i]) {
|
||||
@@ -147,7 +170,10 @@ package alternativa.engine3d.effects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function setDirectionKeys(time:Number):void {
|
||||
vector.x = _direction.x;
|
||||
vector.y = _direction.y;
|
||||
@@ -162,7 +188,10 @@ package alternativa.engine3d.effects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function calculate(time:Number):Boolean {
|
||||
randomCounter = randomOffset;
|
||||
for (var i:int = 0; i < keysCount; i++) {
|
||||
|
||||
@@ -54,9 +54,13 @@ package alternativa.engine3d.effects {
|
||||
public var fogMaxDensity:Number = 0;
|
||||
public var fogNear:Number = 0;
|
||||
public var fogFar:Number = 0;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var scale:Number = 1;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var effectList:ParticleEffect;
|
||||
|
||||
private var drawUnit:DrawUnit = null;
|
||||
@@ -121,11 +125,15 @@ package alternativa.engine3d.effects {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function getTime():Number {
|
||||
return pause ? (stopTime - subtractiveTime) : (getTimer()*0.001 - subtractiveTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
override alternativa3d function collectDraws(camera:Camera3D, lights:Vector.<Light3D>, lightsLength:int, useShadow:Boolean):void {
|
||||
// Create geometry and program
|
||||
if (vertexBuffer == null) createAndUpload(camera.context3D);
|
||||
|
||||
@@ -103,7 +103,9 @@ package alternativa.engine3d.loaders {
|
||||
private var tracksMap:Dictionary;
|
||||
private var materialsMap:Dictionary;
|
||||
private var mapsMap:Dictionary;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var idGenerator:IIDGenerator = new IncrementalIDGenerator();
|
||||
|
||||
/**
|
||||
|
||||
@@ -118,9 +118,13 @@ package alternativa.engine3d.loaders {
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var layersMap:Dictionary;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var layers:Vector.<String>;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var compressedBuffers:Boolean = false;
|
||||
|
||||
private var parsedMaterials:Dictionary;
|
||||
@@ -996,7 +1000,9 @@ package alternativa.engine3d.loaders {
|
||||
}
|
||||
return dest;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d static function traceGeometry(geometry:Geometry):void {
|
||||
var vertexStream:VertexStream = geometry._vertexStreams[0];
|
||||
var prev:int = -1;
|
||||
|
||||
@@ -435,16 +435,6 @@ package alternativa.engine3d.materials {
|
||||
|
||||
private var localToGlobalTransform:Transform3D = new Transform3D();
|
||||
|
||||
/*alternativa3d var lightMapOptions:SamplerOptions = new SamplerOptions(this);
|
||||
|
||||
alternativa3d var normalMapOptions:SamplerOptions = new SamplerOptions(this);
|
||||
|
||||
alternativa3d var environmentMapOptions:SamplerOptions = new SamplerOptions(this);
|
||||
|
||||
alternativa3d var reflectionMapOptions:SamplerOptions = new SamplerOptions(this);
|
||||
|
||||
alternativa3d var diffuseMapOptions:SamplerOptions = new SamplerOptions(this);*/
|
||||
|
||||
/**
|
||||
* Creates a new EnvironmentMaterial instance.
|
||||
* @param diffuseMap
|
||||
@@ -890,7 +880,6 @@ package alternativa.engine3d.materials {
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,9 @@ use namespace alternativa3d;
|
||||
|
||||
// Name of procedure
|
||||
public var name:String;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d static const crc32Table:Vector.<uint> = createCRC32Table();
|
||||
|
||||
private static function createCRC32Table():Vector.<uint> {
|
||||
@@ -39,7 +41,9 @@ use namespace alternativa3d;
|
||||
}
|
||||
return crc_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var crc32:uint = 0;
|
||||
|
||||
/**
|
||||
@@ -57,7 +61,9 @@ use namespace alternativa3d;
|
||||
* Number of strings in a procedure.
|
||||
*/
|
||||
public var commandsCount:int = 0;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var reservedConstants:uint = 0;
|
||||
|
||||
/**
|
||||
@@ -653,7 +659,9 @@ use namespace alternativa3d;
|
||||
res.name = name;
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d static function createCRC32(byteCode:ByteArray):uint {
|
||||
byteCode.position = 0;
|
||||
var len:uint = byteCode.length;
|
||||
|
||||
@@ -46,14 +46,18 @@ package alternativa.engine3d.objects {
|
||||
this.root = root;
|
||||
calculateGeometry();
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d override function calculateVisibility(camera:Camera3D):void {
|
||||
super.alternativa3d::calculateVisibility(camera);
|
||||
if (root.transformChanged) root.composeTransforms();
|
||||
root.localToGlobalTransform.copy(root.transform);
|
||||
calculateMeshesTransforms(root);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d override function setTransformConstants(drawUnit:DrawUnit, surface:Surface, vertexShader:Linker, camera:Camera3D):void {
|
||||
drawUnit.setVertexBufferAt(vertexShader.getVariableIndex("joint"), geometry.getVertexBuffer(ATTRIBUTE), geometry._attributesOffsets[ATTRIBUTE], Context3DVertexBufferFormat.FLOAT_1);
|
||||
var index:uint = _surfaces.indexOf(surface);
|
||||
@@ -72,7 +76,9 @@ package alternativa.engine3d.objects {
|
||||
calculateMeshesTransforms(child);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
override alternativa3d function collectDraws(camera:Camera3D, lights:Vector.<Light3D>, lightsLength:int, useShadow:Boolean):void {
|
||||
if (geometry == null) return;
|
||||
// Calculation of joints matrices.
|
||||
|
||||
@@ -299,7 +299,9 @@ package alternativa.engine3d.objects {
|
||||
result._scaleZ = mesh._scaleZ;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d static function createNormals(mesh:Mesh, color:uint = 0, alpha:Number = 1, thickness:Number = 1, length:Number = 1):WireFrame {
|
||||
var result:WireFrame = new WireFrame(color, alpha, thickness);
|
||||
var geometry:Geometry = mesh.geometry;
|
||||
|
||||
@@ -743,6 +743,9 @@ package alternativa.engine3d.resources {
|
||||
_vertexStreams[index].buffer.uploadFromByteArray(data, byteArrayOffset, startVertex, numVertices);
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function intersectRay(origin:Vector3D, direction:Vector3D, indexBegin:uint, numTriangles:uint):RayIntersectionData {
|
||||
var ox:Number = origin.x;
|
||||
var oy:Number = origin.y;
|
||||
|
||||
@@ -33,8 +33,13 @@ package alternativa.engine3d.resources {
|
||||
|
||||
private const MAX_VERTICES_COUNT:uint = 65500;
|
||||
private const VERTEX_STRIDE:uint = 7;
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var vertexBuffers:Vector.<VertexBuffer3D>;
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d var indexBuffers:Vector.<IndexBuffer3D>;
|
||||
private var nTriangles:Vector.<int>;
|
||||
private var vertices:Vector.<Vector.<Number>>;
|
||||
@@ -103,7 +108,9 @@ package alternativa.engine3d.resources {
|
||||
nTriangles = new Vector.<int>(1);
|
||||
currentSetVertexOffset = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function updateBoundBox(boundBox:BoundBox, transform:Transform3D = null):void {
|
||||
for (var i:int = 0, count:int = vertices.length; i < count; i++) {
|
||||
for (var j:int = 0, vcount:int = vertices[i].length; j < vcount; j += VERTEX_STRIDE) {
|
||||
@@ -130,7 +137,9 @@ package alternativa.engine3d.resources {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function getDrawUnits(camera:Camera3D, color:Vector.<Number>, thickness:Number, object:Object3D, shader:ShaderProgram):void {
|
||||
for (var i:int = 0; i <= currentSetIndex; i++) {
|
||||
var iBuffer:IndexBuffer3D = indexBuffers[i];
|
||||
@@ -155,6 +164,9 @@ package alternativa.engine3d.resources {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
alternativa3d function addLine(v1x:Number, v1y:Number, v1z:Number, v2x:Number, v2y:Number, v2z:Number):void {
|
||||
var currentVertices:Vector.<Number> = vertices[currentSetIndex];
|
||||
var currentIndices:Vector.<uint> = indices[currentSetIndex];
|
||||
|
||||
Reference in New Issue
Block a user