本文整理汇总了C#中Vector4.StereographicProjection方法的典型用法代码示例。如果您正苦于以下问题:C# Vector4.StereographicProjection方法的具体用法?C# Vector4.StereographicProjection怎么用?C# Vector4.StereographicProjection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vector4
的用法示例。
在下文中一共展示了Vector4.StereographicProjection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public void Start()
{
_dataPlot = LoadJson.Instance.Load(_jsonData.text);
_particles = new Particle[_dataPlot.Particles.Length];
_particleSystem = GetComponent<ParticleSystem>();
_camT = Camera.main.transform;
_baseRotation = Quaternion.identity;
_rotations = new[] {Quaternion.identity, Quaternion.identity};
_inV = Vector3.zero;
_sizeSlider.value = ParticleSize;
//Create Points
for (int index = 0; index < _dataPlot.Particles.Length; index++)
{
var p = _dataPlot.Particles[index];
var normal = new Vector4(p.Position.x, p.Position.y, p.Position.z, p.Position.w);
normal.Normalize();
_particles[index] = new Particle()
{
position = normal.StereographicProjection(),
color = p.Color,
size = p.Size
};
}
_particleSystem.SetParticles(_particles, _particles.Length);
//SelectFile.Instance.FileSelected += CreatePoints;
_xPos.text = "0";
_yPos.text = "0";
_zPos.text = "0";
}
示例2: CreatePoints
public void CreatePoints(string filePath)
{
_infoText.text = "Hit Me 1";
_dataPlot = LoadJson.Instance.LoadFromFile(filePath);
_particles = new Particle[_dataPlot.Particles.Length];
for (int index = 0; index < _dataPlot.Particles.Length; index++)
{
var p = _dataPlot.Particles[index];
var normal = new Vector4(p.Position.x, p.Position.y, p.Position.z, p.Position.w);
normal.Normalize();
_particles[index] = new Particle()
{
position = normal.StereographicProjection(),
color = p.Color,
size = p.Size
};
}
_particleSystem.SetParticles(_particles, _particles.Length);
}